IE问:有多少CSS包括它可以处理? [英] IE Question: How many CSS includes can it handle?

查看:109
本文介绍了IE问:有多少CSS包括它可以处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我碰到一个奇怪的现象,而来到Drupal的主题化。我翻了加5到10的链接标签页面中的几个模块。尽管这些新样式加到级联在Firefox,在IE8,通过添加这些浏览器从层次丢弃先前添加CSS文件。事实上,第一个文件是第一次去,这完全搞砸了页面风格和让我抓我的头一段时间。最后,我发现新添加的模块造成了IE通过一些内部阈值,它不能增加新的包含了。

I came across a strange behavior while theming Drupal. I turned a few modules that added 5 to 10 link tags to the page. While these new stylesheets were added to the cascade in Firefox, in IE8, by adding these the browser discarded the earlier added CSS files from the hierarchy. In fact, the first files were the first to go, which completely screwed up the styling of the page and had me scratching my head for a while. Eventually I discovered the newly added modules had caused IE to pass some internal threshold where it could not add new includes anymore.

有没有人见过这种行为?我不知道,如果是用浏览器或我的设置问题。

Has anyone seen this behavior before? I'm not sure if it's an issue with browser or with my setup.

推荐答案

Internet Explorer有32个CSS文件链接的最大限制。这绝对是一个浏览器的问题。你需要考虑整合你的CSS的要求。

Internet Explorer has a maximum limit of 32 CSS file links. Definitely a browser issue. You'll need to think about consolidating your css requests.

一般来说,你可以通过连接他们,如果他们是静态文件做到这一点,但如果你编程生成它们,你可能看一个解决方案之前,它被传递给浏览器处理响应。

Generally you can do this by concatenating them if they're static files, but if you're generating them programatically, you might have to look at a solution to manipulate the response before it gets passed to the browser.

我们必须解决这个问题,我们的企业ASP.Net项目,结束了写的CSS多路复用器,审查的反应,发现所请求的CSS链接,生成一个大的css文件的Web资源,并输出链接到吧。

We had to get around this issue for our enterprise ASP.Net project and ended up writing a "Css Multiplexor" that examined the response, found the requested CSS links, generated a web resource for one big css file, and output a link to that instead.

这篇关于IE问:有多少CSS包括它可以处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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