我用 CSS 修改了复选框和单选按钮的样式,但是现在按钮和标签的位置分散了,看起来不像修改前了...我不知道这有什么问题或如何解决,因为我以前从未修改过复选框和单选按钮。
编辑:
标签仍然与复选框重叠。
CSS:
input[type="checkbox"],
input[type="radio"] {
display: none;
}
input[type="checkbox"] + label {
width: 8px;
height: 8px;
vertical-align: middle;
display: inline-block;
background: white;
border-top: 1px solid rgb(128,128,128);
border-left: 1px solid rgb(128,128,128);
border-right: 1px solid rgb(200,200,200);
border-bottom: 1px solid rgb(200,200,200);
margin-top: 7px;
padding-left: 10px;
}
我想我可以拆分 input[type="checkbox"和 label,而不是做 input[type="checkbox"] + label,但是复选框上的样式不起作用。
我是一名优秀的程序员,十分优秀!