小智 8
input[type="checkbox"] {
-webkit-appearance: checkbox !important;
-moz-appearance: checkbox !important;
-ms-appearance: checkbox !important;
-o-appearance: checkbox !important;
appearance: checkbox !important;
}
Run Code Online (Sandbox Code Playgroud)
您在输入标记上添加了样式,并且复选框是一个输入,考虑在所有输入元素上添加样式input.someclass
或input[type="text"]
不在所有输入元素上添加样式您还可以在所有复选框元素上添加样式
input[type="checkbox"] {
/* styles */
}
Run Code Online (Sandbox Code Playgroud)