checkbox更改默认样式,以及选中文字也可以选中checkbox

input[type='checkbox']{
12px;
height: 12px;
-webkit-appearance:none;
border: 1px solid #297cfa;
border-radius: 2px;
outline: none;
position: absolute;
top: 14px;
left: 54px;
}
input[type=checkbox]:checked{
background: url("../../../../image/checkbox_icon.png")no-repeat center;
background-size: 12px;
}

<div style="padding:10px 50px 0px;font-size: 12px;color: #999999;position: relative;">
<input type="checkbox" id="checkin"/>
<label for="checkin8" style="margin-left: 24px;">我已阅读并知悉上诉业务须知</label>
</div>

 将input和label放在同一个标签div中同时lable的for属性的值等于input的id属性值就可以实现点击label同时控制input

原文地址:https://www.cnblogs.com/823-/p/9335405.html