gpt4 book ai didi

html - IE 8 上带有背景颜色的超链接( anchor )按钮不起作用

转载 作者:行者123 更新时间:2023-11-28 13:21:53 25 4
gpt4 key购买 nike

我尝试设置超链接按钮“”的背景颜色样式,它在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com