html - CSS :checked doesn't work in IE on IIS 7 server

标签 html css internet-explorer iis-7

我正在为我的 radio 做一个图像替换,它在 IE 中本地工作(只需打开 html 页面),在 IE 中的 WAMP 上以及在 IE 中在线的我的 Linux 服务器上工作,但不能在我的内部 IIS 上工作7 服务器。适用于 IIS 服务器上的 Chrome,但不适用于 IE。

HTML

<input id='Good' type='radio' class='css-checkbox'name='value' value='1'/>  
    <label  id='1' class='css-label' for='Good'> Good </label>

CSS

input[type=radio].css-checkbox {
    margin: 10px;
    display:none;
}
input[type=radio].css-checkbox + label.css-label {
    padding-left:27px;
    height:22px; 
    display:inline-block;
    line-height:22px;
    background-repeat:no-repeat;
    background-position: 0 0 !important;
    vertical-align:middle;
    cursor:pointer;
}
label.css-label {
    margin: 10px;
    background-image:url(../images/radio.png);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
input[type=radio].css-checkbox:checked + label.css-label{
    background-position: 0 -22px !important;
} 

最佳答案

所以这是一个兼容性 View 问题。我进入“兼容性 View 设置”并取消选中“在兼容性 View 中显示 Intranet”。现在工作正常。

关于html - CSS :checked doesn't work in IE on IIS 7 server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22843320/

相关文章:

javascript - 刷新 jquery mobile 后样式和 javascript 不工作

html - 2个不同的定制(标签)类

javascript - Firebug Lite 使我的网站可以在 IE 中运行

html - 奇怪的 Html Css 错误

javascript - jQuery 选择器不适用于 IE7 和 IE8 中动态创建的内容

javascript - unitPngFix 防止更改隐藏的 "display"的 "div"

javascript - 在 IE 中测量 Javascript 性能

html - 样式不同的 ul 标签

html - 如何在没有 jQuery 的情况下像自定义 chrome 一样在 firefox 中自定义滚动条

html - 具有背景+填充的响应图像