标签<input type="checkbox" id="checked"/> <span>请选择</span>css样式使用after伪类选择器#checked[type=checkbox] { position: relative; width: 16px; height: 16px; cursor: pointer; } #ch
.wx-
checkbox
-input.wx-
checkbox
-input-checked{
background: #0d59c3;
border:1px solid #0d59c3;
color:#ffffff;
checkbox
/ radoi默认不支持更改
背景
颜
色
,这里可以使用伪类来实现。基本原理是利用after/ before插入新的元素。然后利用新元素的
背景
颜
色
或
背景
图片覆盖掉原来的样式。
CSS
代码:
input[type=
checkbox
] {
margin-right: 5px;
cursor: pointer;
font-size: 14px;
width: 15px;