IE CSS文件限制
2011-08-14 09:54
323 查看
doc.createStyleSheet() invalid argument exception
Internet Explorer (IE for short) imposes some CSS file limitations that may directly affect page rendering. Below is a list of known CSS file limitations still found in IE version 9 and earlier. - Up to 31 CSS files or <style> tags per page.- Up to 288K per CSS file (uncompressed).
- Up to 4095 selectors per CSS file. If a page exceeds the first limit, it fails loading all the required CSS files. Once a CSS file hits the second or third limit, any additional style in the file will be ignored. Resource merging, which help you reduce the number of requests made to the server, may bring the following dilemma in IE. If you are not using resource merging, you can pretty easily hit the first limit. On the other hand, if resource merging is enabled you may eventually hit the other two limits. So, to avoid hitting the limits, we recommend that you enable or disable resource merging based on the CSS file structure you are using. Currently, the solution to automatically manage our CSS files in order to keep them within the limits is not ready yet. We created a corresponding suggestion in our Support Center (Suggestion ID: S35991, In IE, automatically split CSS resources if their size exceeds 288K) so that you can track our progress on it. The first limitation usually occurs when the <head> tag contains several <link> and <style> tags. A number of linked styles to the page can be got via the document.styleSheets.length property in the JavaScript console. Using the document.styleSheets collection, you will be able to determine what styles are linked to a specific page (e.g. use the FireBug console). http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx Resource Merging http://documentation.devexpress.com/#AspNet/CustomDocument6911
相关文章推荐
- IE加载外链CSS文件限制问题
- IE8对css文件的限制
- 在IE与非IE下运用不同的css文件方法
- 如何去掉“为了保护您的安全,IE已限制此文件显示可能访问您的计算机的活动内容,单击此处查看选项”
- 做了一个上传组件以后,在IE中通过以下代码限制上传文件类型为jpg和png:
- css圆角与阴影,[ie-css3.htc文件需要下载]
- 如何在Asp.net 页面中添加CSS和JS的引用, 使得不是文件路径的限制
- IE无法引入css文件
- js 限制IE 文件上传大小
- 用SCSS需要小心IE对css的几个限制
- IE无法引用外部CSS文件
- 用SCSS需要小心IE对css的几个限制
- 解决IE对FLASH文件激活限制的问题
- IE6单个css文件使用 @import url(xxx.css);次数限制
- 如何让IE读取本地网页时不提示“Internet Explorer 已经限制此文件显示可能访问您的计算机的活动内容。”
- DotNetNuke(DNN)皮肤制作-通过JS文件解决不同IE版本对CSS解释不一致的问题
- IE下限制输入法切换的css
- Html+CSS input type=file 文件类型限制属性 accept (HTML 5)
- css文件没有被IE识别
- 得到样式(兼容IE和FF,支持CSS文件中定义的样式)