21,886
社区成员
发帖
与我相关
我的任务
分享
<style type="text/css">
label::before {
content: "";
display: inline-block;
width: 25px;
height: 25px;
background: #EEE;
vertical-align: middle;
-webkit-border-radius: 50%;
/*margin-right: 1px;*/
-webkit-box-sizing:border-box;
-webkit-transition:background ease-in .5s
}
/*复选框里底的颜色:红色*/
input[type="checkbox"]:checked+label::before{
background-color: #FF00FF;
/*border: 1px #b3b3b3 solid;*/
}
/*若要复选框里底的颜色:黑色
input[type="checkbox"]:checked+label::before{
background-color: #000000;
/*border: 1px #b3b3b3 solid;*/
}
/*自定义复选框checkbox*/
.sex_checkbox{
position: relative;
}
.sex_checkbox input[type="checkbox"]{
display: none;
}
</style>
<body>
<div class="sex_checkbox">
<table width="200" border="2" cellspacing="2" cellpadding="2">
<tr>
<td><input type="checkbox" id="se" value="0" name="sex"><label for="se"></label></td>
<td><input type="checkbox" id="se1" value="0" name="sex"><label for="se1"></label></td>
</tr>
</table> </div>