css模拟复选框

div id="del" class="sel_list">
    <input id="add_89" value="89" type="checkbox"/><label for="add_89">label>dfa
div>
<div id="del" class="sel_list">
    <input id="add_90" value="90" type="checkbox"/><label for="add_90">label>dfa
div>
input{
     
  display: none;
}
 label{
     
  width:15px;
  height:15px;
  margin-top:3px;
  margin-right:3px;
  vertical-align:middle;
  background: url(../i/input.png) no-repeat;
  background-size: 100%;
}
input[type=checkbox]:checked + label{
     
  background: url(../i/input1.png) no-repeat;
  background-size: 100%;
}

 

input.png

 

input1.png

 

转载于:https://www.cnblogs.com/xsffliu/p/9018439.html

你可能感兴趣的:(css模拟复选框)