<?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>刘鹏的博客 &#187; CSS</title>
	<atom:link href="http://www.19870202.com/archives/tag/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.19870202.com</link>
	<description>Web boy&#039;s blog</description>
	<lastBuildDate>Thu, 29 Jul 2010 11:40:02 +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>解决css背景图片在ie6不被缓存bug</title>
		<link>http://www.19870202.com/archives/260</link>
		<comments>http://www.19870202.com/archives/260#comments</comments>
		<pubDate>Wed, 10 Dec 2008 14:16:46 +0000</pubDate>
		<dc:creator>刘 鹏</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://my43.host1.ismole.com/?p=260</guid>
		<description><![CDATA[ie6有个bug，css定义的背景图片不被缓存，今天发现a:hover定义了背景图片，只要鼠标在a上挪动一下就会发送一次请求，这是由于图片没有被缓存，于是上网搜索了下，找到了一个解决方案，很简单，代码如下<br /></br><br /></br><div class="codeArea js">&#160;&#160;document.execCommand('BackgroundImageCache', false, true);</div><br /></br>这个bug存在于ie7以前的版本，因此可以做一个版本的判断<br /></br><div class="codeArea js">var userAgent = navigator.userAgent.toLowerCase(),<br /></br>&#160;&#160;&#160;&#160;&#160; version = (userAgent.match( /.+(?:rv&#124;it&#124;ra&#124;ie)[/: ]([d.]+)/ ) &#124;&#124; [])[1];<br /></br>if (/msie/.test( userAgent ) &#38;&#38; version &#60; 7) {<br /></br>&#160; try {<br /></br>&#160;&#160; document.execCommand('BackgroundImageCache', false, true);<br /></br>&#160; } catch(ex) {}<br /></br>}</div><br /></br><br /></br>参考<a href="http://bokee.shinylife.net/blog/article.asp?id=493"> http://bokee.shinylife.net/blog/article.asp?id=493</a>]]></description>
			<content:encoded><![CDATA[<p>ie6有个bug，css定义的背景图片不被缓存，今天发现a:hover定义了背景图片，只要鼠标在a上挪动一下就会发送一次请求，这是由于图片没有被缓存，于是上网搜索了下，找到了一个解决方案，很简单，代码如下<br /></br><br /></br>
<div class="codeArea js">&nbsp;&nbsp;document.execCommand(&#8216;BackgroundImageCache&#8217;, false, true);</div>
<p></br>这个bug存在于ie7以前的版本，因此可以做一个版本的判断<br /></br>
<div class="codeArea js">var userAgent = navigator.userAgent.toLowerCase(),<br /></br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version = (userAgent.match( /.+(?:rv|it|ra|ie)[/: ]([d.]+)/ ) || [])[1];<br /></br>if (/msie/.test( userAgent ) &amp;&amp; version &lt; 7) {<br /></br>&nbsp; try {<br /></br>&nbsp;&nbsp; document.execCommand(&#8216;BackgroundImageCache&#8217;, false, true);<br /></br>&nbsp; } catch(ex) {}<br /></br>}</div>
<p></br><br /></br>参考<a href="http://bokee.shinylife.net/blog/article.asp?id=493"> http://bokee.shinylife.net/blog/article.asp?id=493</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.19870202.com/archives/260/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
