需求:将勾选列表的勾选颜色符合页面整体样式,都为淘宝的橘红色
修改为
只需要加入如下代码,将input[type=checkbox]的样式做一些修改即可
css
input[type=checkbox] {
cursor: pointer;
position: relative;
width: 18px;
height: 18px;
font-size: 12px;
}
input[type=checkbox]::after {
position: absolute;
top: 0;
color: #000;
width: 18px;
height: 18px;
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: #ff4014;
}