我在使用 IE9 时遇到了一个奇怪的问题,它自己忽略了某些 CSS 规则。即使 IE8 也能正确加载它。 IE 10 以及所有更好的浏览器(例如 FF 和 Chrome)也是如此。
css 正在使用“text/css”MIME 加载。
例如,
IE9 不应用这些规则。我在开发者工具栏 CSS 选项卡中找不到这些规则。
.B2B .info_cart { display: block; clear: both !important; }
.B2B .info_cart .priceDetail { font: 14px/22px Arial,Helvetica,sans-serif; padding-left: 3px; }
.B2B .info_cart .priceInfo { bottom: 2px; font-size: 10px; line-height: 24px; margin: 0 0 0 2px; overflow: hidden; padding: 0; position: absolute; word-wrap: break-word; }
.B2B .info_cart .info_vat { font-size: 10px; float: right; margin-top: 7px; }
相关HTML:
<div class="info_cart clearfix">
<span class="spanBasketInfo"></span>
<span class="cartValue"></span>
<span class="cartShippingDetails"></span>
<span class="info_vat">
<span class="exc">exc. VAT</span>
<a href="#">(change)</a>
</span>
</div>
可能出什么问题了?
UPDATE这是我正在使用的 Doctype,如果有帮助的话。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="sv" xmlns="http://www.w3.org/1999/xhtml" class=" js no-touch borderradius boxshadow textshadow opacity cssgradients csstransitions">
终于抓住了问题所在。 IE 无法处理样式表中超过 4096 个选择器。因此,在达到 4096 个选择器的限制后,它会忽略所有样式规则。
将 CSS 文件拆分为两个单独的文件后,问题得到解决。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)