【发布时间】:2019-01-31 06:09:46
【问题描述】:
这里有一个多选列表,如下所示。
但我无法更改 CSS。这是到目前为止我尝试过的代码,我能够获得轮廓颜色,内部刻度无法看到它。
input[type=checkbox], input[type=radio] {
margin: 4px 0 0;
margin-top: 1px\9;
height: 16px;
border-radius: 2px;
line-height: normal;
box-shadow: none;
outline-offset: -1px;
-webkit-appearance: none;
width: 16px !important;
margin: 5px;
appearance:none;
outline: 2px solid #455eab;
font-size: 2em;
}
.form-check-input{
width: 35px;
}
input[type="checkbox"]:checked ~ label::before {
color: #455eab;
}
<input class="form-check-input"[checked]=true type="checkbox">
<input class="form-check-input" type="checkbox" >
<input class="form-check-input" type="checkbox" >
<input class="form-check-input" type="checkbox" >
【问题讨论】:
-
input[type="checkbox"]:checked ~ label::after我在 HTML 中看不到任何标签
标签: css checkboxlist