radio和checkbox样式的修改

1.radio

/* radio */

input[type="radio"]:checked {
    background:url(../images/check2.png) -1px -2px;
    background-size: 15px;
    border:#00A0E9 1px solid;
}
input[type="radio"] {
    -webkit-appearance: none;
    border: 1px solid #00A0E9;;
    height: 15px;
    width: 15px;
    outline: none;
    vertical-align: middle;
    cursor: pointer;
}

 

关于radio还有一种在点击打开链接上看到,这里先拿过来记录一下

 




	
	Document
	


	
	

 

 

 

 

 

2.checkbox

/* checkbox */

 input[type=checkbox] {    
        position: relative;   
    }    
    input[type=checkbox]::before{    
        content:'';    
        position: absolute;    
        width: 18px;    
        height: 18px;
        top: -4px;    
        background: url("../images/check1.png") no-repeat;    
    }    
    input[type=checkbox]:checked::before {    
        background: url("../images/check2.png") no-repeat;  
        content: '';    
    }   

 

关于checkbox还有一种在http://demo.cssmoban.com/cssthemes4/tid_5_klorofil/index.html上看到在这里先拿过来记录一下

 




	
	Document
	


	

 

input[type="radio"]
    {
        -webkit-appearance: none;/*让原本的样式不起作用(这是重点)*/
        border:1px solid #DADADA;/*分割线*/
        height:15px;
        width:15px;
        outline:none;
        vertical-align: middle;
        cursor: pointer;
    }
input[type="radio"]:checked
    { 
        background:#F34E51 url(../images/input_gou.png) 1px 2px;
        background-size: 13px;/*背景大小*/
    }
input[type="checkbox"]
    {
        -webkit-appearance: none;/*让原本的样式不起作用(这是重点)*/
        border:1px solid #DADADA;/*分割线*/
        height:15px;
        width:15px;
        outline:none;
        vertical-align: middle;
        cursor: pointer;
    }
input[type="checkbox"]:checked
    { 
        background:#F34E51 url(../images/input_gou.png) 1px 2px;
        background-size: 13px;/*背景大小*/
    }

 

 

 

 

3.还有关于select的样式后补

 

你可能感兴趣的:(常用的样式以及板块)