CheckBox 如何改变背景色和选中时的背景颜色 转载 忘记是谁的了。
<style>
input[type=checkbox] {
cursor: pointer;
position: relative;
width: 15px;
height: 15px;
font-size: 14px;
}
input[type=checkbox]::after {
position: absolute;
top: 0;
color: #000;
width: 15px;
height: 15px;
display: inline-block;
visibility: visible;
padding-left: 0px;
text-align: center;
content: ' ';
border-radius: 3px
}
input[type=checkbox]:checked::after {
content: "✓";
color: #fff;
font-size: 12px;
font-weight: bold;
background-color: #ff366f;
}
</style>