html – IE 9忽略了CSS规则

前端之家收集整理的这篇文章主要介绍了html – IE 9忽略了CSS规则前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我对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文件拆分为两个单独的文件后,问题得到解决.

猜你在找的HTML相关文章