【发布时间】:2012-06-09 18:47:05
【问题描述】:
您好,我一直在尝试使用自定义单选按钮,以下是我的 css。我已经用两个浏览器 IE9 和谷歌浏览器在谷歌浏览器上对其进行了检查,但在 ie9 上我提到的单选按钮图像没有显示请让我知道如何修复以下 css,以便它也可以在 ie9 上运行
input[type="radio"] {
background:url('images/radio_Checked.jpg');
padding:0;
width:10px;
height:10px;
display: inline-block;
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;
vertical-align:middle;
}
input[type="radio"]:checked {
background:url('images/radio_Unchecked_Small.jpg');
}
还尝试了以下 css,它也只能在 google 上正常工作
input[type="radio"]:checked
{
-khtml-appearance: none;
background: url('images/radio_Checked.jpg');
width: 10px;
height: 10px;
}
【问题讨论】:
-
apearance、-moz-apearance和-webkit-apearance中的任何一个都没有none选项。查看这些参考资料:1.w3schools.com/cssref/css3_pr_appearance.asp,2.cssportal.com/css-properties/appearance.htm -
我只想在选中的单选按钮上使用第二个提到的 css 背景出现在 IE9 上,但黑点和谷歌浏览器工作正常,黑点没有出现 /跨度>