<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>随网之舞4095</title>
	<atom:link href="http://dancewithnet.com/tag/4095/feed/" rel="self" type="application/rss+xml" />
	<link>http://dancewithnet.com</link>
	<description>WEB Design{HTML:CSS:Javascript:DOM:AJAX:PHP:Usability}/Viewpoint/Photo/Food/Mood</description>
	<lastBuildDate>Mon, 18 Jul 2011 02:45:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>IE中选择符的4095限制</title>
		<link>http://dancewithnet.com/2009/09/10/ie-css-4095-limit/</link>
		<comments>http://dancewithnet.com/2009/09/10/ie-css-4095-limit/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 15:42:42 +0000</pubDate>
		<dc:creator>秦歌</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[4095]]></category>
		<category><![CDATA[addRule]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[cssText]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://dancewithnet.com/?p=1471</guid>
		<description><![CDATA[去年曾总结了《IE对CSS样式表的限制和解决方案》中限制的第4条写道“一个CSS文件的不能超过288kb？”，这是一个疑问句，当时没有重现出来且参考来自Internet Explorer CSS File Size Limit。今天终于... ]]></description>
			<content:encoded><![CDATA[<p>去年曾总结了<a href="http://dancewithnet.com/2008/04/22/a-solution-of-limit-of-style-tags-in-ie/">《IE对CSS样式表的限制和解决方案》</a>中限制的第4条写道“一个CSS文件的不能超过288kb？”，这是一个疑问句，当时没有重现出来且参考来自<a href="http://joshua.perina.com/africa/gambia/fajara/post/2008/1/25/internet-explorer-css-file-size-limit">Internet Explorer CSS File Size Limit</a>。今天终于看到了IE在CSS上的另一个限制：<strong>IE中每个style标签或css文件的选择符个数不能超过4095。</strong>其实style属性也应该有这个限制，但是几乎不可能发生。这个限制在IE6、IE7和IE8中存在。请看<a href="http://dancewithnet.com/lab/2009/ie-css-4095-limit/" class="link-btn">IE关于4095个选择符限制的DEMO</a>。</p>
<p><span id="more-1471"></span></p>
<p>DEMO中的<a href="http://dancewithnet.com/lab/2009/ie-css-4095-limit/style.css">style.css</a>有4913个选择符，大小为554kb，但在IE中却在4095个选择符之后失效，所以说明IE的CSS文件不存在不能超过288kb的限制。</p>
<p>所以在IE中对style标签使用<a href="http://msdn.microsoft.com/en-us/library/aa358796%28VS.85%29.aspx">addRule方法</a>和<a href="http://msdn.microsoft.com/en-us/library/ms533698(VS.85).aspx">cssText属性</a>添加样式时都可能会碰到这个限制，比如使用addRule方法添加第4096个选择符时会报“Invalid Argument”的异常。</p>
]]></content:encoded>
			<wfw:commentRss>http://dancewithnet.com/2009/09/10/ie-css-4095-limit/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

