IE 9忽略CSS规则 [英] IE 9 ignoring CSS rules

查看:173
本文介绍了IE 9忽略CSS规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个奇怪的问题,IE9在那里它自己忽略某些CSS规则。甚至IE8加载它正确。所以IE 10和所有更好的浏览器,如FF和Chrome。

I have this weird issue with IE9 where it is ignoring certain CSS rules on its own. Even IE8 loads it correctly. So does IE 10 and all the nicer browsers like FF and Chrome.

css正在加载text / cssMIME。

The css is being loaded with "text/css" MIME.

例如,

IE9未套用这些规则。我在开发者工具栏CSS选项卡中找不到这些规则。

These rules are not being applied by IE9. I cannot find these rules in the developer toolbar CSS tab.

.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,如果它有帮助。

UPDATE This is the Doctype I am using, if it helps.

<!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个选择器的限制后忽略了所有的样式规则。

Finally got hold of the problem. IE cannot handle more than 4096 selectors in a stylesheet. Therefore it was ignoring all the style rules after it reached its limit of 4096 selectors.

将CSS文件拆分为两个单独的文件后,问题已解决。

After splitting the CSS file into two separate files, the problem was fixed.

这篇关于IE 9忽略CSS规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆