input为checkbox 勾勾制作

原生的多选框中的勾勾默认黑色 当改变背景为黑色时 勾勾不显示 此时自己做一个勾勾:
.fixed-table-container input[type=checkbox], .fixed-table-container input[type=radio] {
-webkit-appearance: none;
vertical-align: middle;
margin-top: 0;
border: #1e89e4 solid 1px;
border-radius: 3px;
min-height: 12px;
min-width: 12px;
outline: none;
position: relative;
}

/勾勾/
.fixed-table-container input[type=checkbox]:checked::after{
content: ‘’;
top: 3px;
left: 2px;
position: absolute;
background: transparent;
border: #fff solid 2px;
border-top: none;
border-right: none;
height: 4px;
width: 8px;
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}

猜你喜欢

转载自blog.csdn.net/qq_43121828/article/details/90042248