悬停在 IE8 中不起作用,它会在悬停时划掉文本。
这是代码。
HTML
<div class="divCls">
<span class="textColor">Contacts</span>
</div>
CSS
.divCls:hover{
background-color:#E8F7F9 !important;
padding-top: 5px;
padding-bottom: 5px;
}
最佳答案
在 IE8 中,如果您在 quirks 模式下运行,:hover
仅支持 <a>
元素(<div>
不是)。
确保您有一个可以触发标准模式的 Doctype。
参见 the Wikipedia article on Quirks mode进一步阅读。
关于html - 悬停在 IE 8 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10516857/