自定义input框 全选/半选样式

需要js手动设置inpu的indeterminate属性为true

input:indeterminate::after {
  content: "";
  display: block;
  height: 3px;
  width: 7px;
  margin: 40% auto;
  background-color: #395acc;
}

input:checked,
input:indeterminate,
input:checked::after {
  background-color: #395acc ;
  border: 1px solid #395acc ;
}
posted @ 2022-02-10 19:43  IslandZzzz  阅读(426)  评论(0编辑  收藏  举报