我尝试设置超链接按钮“”的背景颜色样式,它在 Chrome、IE9、Firefox 等上运行良好,但 IE 8 除外。经过进一步调查,我发现 IE8 不支持 button:not(.t-button) 之类的 css它打破了
我想知道我是否需要在不同的文件上为 IE 8 添加不同的 css,或者我可以更新语法以使其不会因 IE 8 而中断。
button:not(.t-button), .btn, a.btn, input[type="button"], input[type="submit"] {
display: inline-block;
padding: 0px 10px;
border: none;
margin: 6px 0 0;
height: 24px;
background-color: rgb(64,141,198);
font-family: 'Arial' ,sans-serif;
font-weight: bold;
font-size: 1em; /* 12 */
line-height: 2em;
color: rgb(255,255,255);
cursor: pointer;
box-shadow: none;
-webkit-appearance: none;
}
这是类似 http://jsfiddle.net/786wF/ 的 jsFiddle
我们将不胜感激任何帮助。
问候 巴韦什
最佳答案
首先:不支持非伪选择器
更多信息:
其次,您的 html 无效,将 div 放在 anchor 内
将内部 DIV 替换为 SPAN
IE 会欣赏
第三:jsfiddle 不支持 IE < 8
关于html - IE 8 上带有背景颜色的超链接( anchor )按钮不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14573103/