如何在IE中的单选按钮样式复选框 [英] how to style checkbox like a radio button in IE
本文介绍了如何在IE中的单选按钮样式复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道这听起来有线。目前我有多个复选框,我想让它看起来像单选按钮
I know it sounds wired. Currently I have multiple checkboxs I want to make it looks like radio button
以下CSS在IE中不起作用
following CSS not working in IE
input[type='checkbox'] {
-webkit-appearance: radio; /* Chrome, Safari, Opera */
-moz-appearance: radio; /* Firefox */
appearance: radio; //how about IE>8 ?
}
推荐答案
/ em>属性在Internet Explorer中不受支持。你需要改为定位伪元素 :: - ms-check
并影响它的表示,甚至这只会让你部分:
The appearance property is not supported in Internet Explorer. You would need to instead target the pseudo element ::-ms-check
and affect its presentation, and even this will only get you part-way:
::-ms-check {
border-radius: 50%;
}
由于以区分两者。
As Spudley stated in the comments above, this is a bad idea. Radio buttons and checkboxes function in distinctly different ways, and users have been taught to distinguish between the two.
这篇关于如何在IE中的单选按钮样式复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文