gpt4 book ai didi

html - 内容 :attr(); not working in IE 10

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

出于某种原因,IE 无法获取如下设置的内容:attr(data-title)。尽管在 FF 和 Chrome 中工作。

如何解决这个问题?

<a href="#" class="nav-roll">
<span data-title="About">About</span>
</a>


.nav-roll span:after {
background: none repeat scroll 0 0 #0198cd;
color: #FFF;
content: attr(data-title);
display: block;
padding: 0 2px;
position: absolute;
left: 0;
top: 0;
}

最佳答案

您还没有添加 <!DOCTYPE html>到 HTML 文件的顶部,迫使 IE 进入 Quirks 模式。 IEQuirks 不支持 :after完全没有。

关于html - 内容 :attr(); not working in IE 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15486879/

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