<div class="checkbox font_s">
<label>
<input type="checkbox"> 设备状态
</label>
</div>
.checkbox input[type="checkbox"] {
-webkit-appearance: none; /*清除复选框默认样式*/
background: #fff url("../images/unchecked.png") no-repeat; /*复选框的背景图,就是上图*/
width: 15px;
height: 15px;
vertical-align: middle;
outline: none; /*去掉自带的边框*/
}
.checkbox input[type="checkbox"]:checked {
-webkit-appearance: none; /*清除复选框默认样式*/
background: url("../images/checked.png") no-repeat;
width: 15px;
height: 15px;
vertical-align: middle;
outline: none;
}
checkbox样式改写
最新推荐文章于 2024-05-07 09:22:09 发布