您应该对状态::before
和::after
伪元素进行类似的处理:indeterminate
,就像处理:checked
状态一样。
从CSS删除此部分:
input[type=checkbox]:indeterminate {
content: "";
display: block;
color: white;
width: 17px;
height: 17px;
background-color:#3B99FC;
}
将它们添加到CSS:
input[type=checkbox]:indeterminate::before {
content: "";
display: block;
color: white;
width: 17px;
height: 17px;
background-color:#3B99FC;
}
input[type=checkbox]:indeterminate::after {
content: "";
display: block;
width: 10px;
height: 10px;
border: solid white;
border-width: 2px 0 0 0;
position: absolute;
top: 9px;
left: 5px;
}
您可以调整不确定状态减号内部符号的大小/位置input[type=checkbox]:indeterminate::after
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句