自定义复选框样式
复选框样式
1 input[type="checkbox"]{ 2 position: relative; 3 -webkit-appearance: none; 4 background: transparent; 5 z-index: 1; 6 margin-right: 20px; 7 } 8 input[type="checkbox"]:after{ 9 content: ""; 10 width: 15px; 11 height:15px; 12 background: #fff; 13 position: absolute; 14 top: -12px; 15 left: 0; 16 z-index: 0; 17 background: url(../images/submission/checkbox0.png) no-repeat; 18 background-size: 15px; 19 background-position:center ; 20 21 } 22 input[type="checkbox"]:checked:after{ 23 background: url(../images/submission/checkbox1.png) no-repeat; 24 background-size: 15px; 25 background-position:center ; 26 }