这段代码在Chrome中工作,但默认的单选按钮在IE中显示在样式上。IE单选按钮隐藏不起作用
在IE中,单选按钮没有隐藏起来。这是代码。
input[type=radio] {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
width: 15px !important;
height: 15px !important;
border: 3px solid #999999 !important;
border-radius: 50% !important;
outline: none !important;
}
input[type=radio]:hover {
}
input[type=radio]:before {
content: '' !important;
display: block !important;
width: 100% !important;
height: 100% !important;
margin: 0 auto !important;
border-radius: 50% !important;
}
input[type=radio]:checked:before {
background: #005eb8 !important;
}
<input type="radio" id="a"/>No 1
你不能像'input',仍然,Chrome并使其单标签元素使用伪元素,IE不 – LGSon
不要设计单选按钮本身,因为有些浏览器不支持。使用一些更多的标记来定制无线电或检查按钮。很好的例子 - https://codepen.io/mitchmc/pen/pebIx – 3rdthemagical
我可以在你的IE版本中知道吗? IE老bowers不支持伪元素。 http://caniuse.com/#feat=css-gencontent http://stackoverflow.com/questions/7157405/are-css3-before-and-after-pseudo-elements-supported-by-ie9-or-不是 –