简体   繁体   English

IE8 / IE9不加载CSS

[英]IE8 / IE9 does not load CSS

On this site http://gaeilge2013.ie/ some stylesheets are not loading in IE9. 在这个网站http://gaeilge2013.ie/一些样式表没有在IE9中加载。 In Chrome / Firefox / Opera / Safari it's all good. 在Chrome / Firefox / Opera / Safari中,一切都很好。 Very strange. 很奇怪。

This is the css which is not applying: 这是不适用的css:

<link rel='stylesheet' id='dzs.timelineslider-css' href='http://gaeilge2013.ie/wp-content/plugins/dzs-timelineslider/timelineslider/timelineslider.css?ver=3.5.1' type='text/css' media='all' />

Link is good. 链接很好。 ... ...

Thanks! 谢谢!

The problem you have is due to a limit that IE imposes on the number of stylesheets. 您遇到的问题是IE限制了样式表的数量。 IE can only load a maximum of 31 separate CSS files in a single page. IE只能在一个页面中加载最多31个单独的CSS文件。

There are plenty of references for this one the web, but here's one from MSDN 这个网络有很多参考资料,但这里有一个来自MSDN

This is a hard limit in IE. 这是IE中的一个硬限制。 It is possible to load more CSS files than that by using specific techniques: if you use @import to load CSS files from inside others, it is possible to import up to 31 files for each of the 31 main CSS files. 通过使用特定技术可以加载更多的CSS文件:如果使用@import从其他内部加载CSS文件,则可以为31个主要CSS文件中的每一个导入最多31个文件。 But it's not an ideal solution. 但它不是一个理想的解决方案。

In general, it's better to reduce the number of files if possible -- each file that loads is a separate HTTP request, and having large numbers of requests can have a significant impact on page load performance. 通常,如果可能的话,最好减少文件数量 - 加载的每个文件都是单独的HTTP请求,并且拥有大量请求会对页面加载性能产生重大影响。

My suggestion would be to try to combine the large number of CSS files you have into fewer files. 我的建议是尝试将大量的CSS文件合并到更少的文件中。 This shouldn't be a difficult task, but there may be WP plugins you could use that would do this for you automatically if necessary. 这应该不是一项艰巨的任务,但是如果需要,可以使用可以自动执行此操作的WP插件。

You can use Modernizr for fixing this issue. 您可以使用Modernizr来解决此问题。 It is a powerful crossbrowser javascript plugin that fixes all those special cases as for the multiple IE versions as for the rest of the browsers. 它是一个功能强大的crossbrowser javascript插件,可以修复所有这些特殊情况,就像其他浏览器一样,可以修复多个IE版本。

I leave you the link here so you can take a look: 我给你留下这里的链接,你可以看看:

http://modernizr.com/docs/#installing http://modernizr.com/docs/#installing

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM