<span class="nodes-checkbox">
<input type="checkbox">
</span>
.nodes-checkbox {
input:checked {
position: relative;
&::before{
content: "";
display: inline-block;
position: absolute;
top: 1px;
left: 4px;
width: 5px;
height: 10px;
border-right: 2px solid #fff;
border-bottom: 2px solid #fff;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
z-index: 1;
}
&::after{
content: "";
display: inline-block;
position: absolute;
width: 100%;
height: 100%;
background-color: #d0121b; // 改变颜色
border-radius: 2px;
}
}
}