<?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; DD_belatedPNG</title>
	<atom:link href="http://interjc.net/tags/dd_belatedpng/feed" rel="self" type="application/rss+xml" />
	<link>http://interjc.net</link>
	<description></description>
	<lastBuildDate>Wed, 08 Feb 2012 09:08:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://interjc.net/?pushpress=hub'/>
		<item>
		<title>用DD_belatedPNG插件修复IE6 PNG</title>
		<link>http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html</link>
		<comments>http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html#comments</comments>
		<pubDate>Sat, 10 Jul 2010 10:50:11 +0000</pubDate>
		<dc:creator>interjc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[anti_ie6]]></category>
		<category><![CDATA[DD_belatedPNG]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html</guid>
		<description><![CDATA[IE6是一个令人作呕的话题，个人极为厌恶IE6，并且恨屋及乌，不过没有办法，中国就是这么一个神奇的国度，到了2010年仍然有不少人以使用“简单、快捷”的IE6为荣，不知道浏览器为何物的也更加不提了，而这种人往往又是互联网中广告点击的生力军，消费能力强，所以你必须照顾到他们的感受。 我对IE6恨之入骨的重要原因之一，恐怕就是对PNG各种半透明的支持情况了。我们在其他浏览器可以轻松实现的图片半透明效果，到了IE6这儿就得纠结蹉跎，虽然IE6勉强的支持PNG-8格式的伪半透明，但这个和GIF图片的效果相差并不大，如果你使用PNG-32的话，你所有的半透明区域都会变成灰底。 网上有不少IE6上实现PNG半透明的工具，各有千秋，大多数使用了IE的一个滤镜：AlphaImageLoader，使用后会有各种诸如问题（比如background-position和background-repeat属性支持的不完善，有些还会擅自更改背景图片的尺寸）。DD_belatedPNG提供了一种新的选择，他使用微软的VML语言对PNG图片进行重新绘制，以达到半透明的效果，并且能支持background-position和background-repeat属性。 查看Demo &#124; 打包下载 其使用方法也不难，先在此下载DD_belatedPNG ，然后插入head标签中： &#60;!--&#91;if IE 6&#93;&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;DD_belatedPNG_0.0.8a-min.js&#34;&#62;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34;&#62; DD_belatedPNG.fix&#40;'.png'&#41;; &#60;/script&#62; &#60;!&#91;endif&#93;--&#62; 将所有需要需要修补的元素加上class=”png”即可 PS：对于:focus和:hover伪类，则需要将以上代码中的 : DD_belatedPNG.fix(&#8216;.png&#8217;); 修改为 : DD_belatedPNG.fix(&#8216;.png,a.png:hover,.png:focus&#8217;); BTW：虽然这样可以缓解IE6下PNG的问题，不过会带来性能问题，还有一些其他的问题，自然是不如对png半透明有原生支持的浏览器的。所以，赶快让该死的IE6下地狱吧。阿门！ 评论2010/09/05, 夏小淚 说: 我现在都推荐我身边的朋友使用chrome或是FF,有些不会用的，就把IE6直接升级IE8了~！！2010/09/08, interjc 说: @夏小淚, good job！2010/09/10, Runescapegold 说: ie6很少有人用了2010/09/10, 皇家元林 说: 你那个链接前面的图标是怎么加上去的？而且只是链接有，图片没有呢？2010/09/10, interjc 说: @皇家元林, 神奇吧，哈哈～ jquery+css...2010/09/10, 皇家元林 说: 能教教我吗？谢谢！2010/09/10, interjc 说: @皇家元林, 这个说来话长啊，你可以看我的源码中文哦style.css和javascript.js，搜索more-link看相关代码..2010/11/24, Tao [...]]]></description>
			<content:encoded><![CDATA[<p>IE6是一个令人作呕的话题，个人极为厌恶IE6，并且恨屋及乌，不过没有办法，中国就是这么一个神奇的国度，到了2010年仍然有不少人以使用“简单、快捷”的IE6为荣，不知道浏览器为何物的也更加不提了，而这种人往往又是互联网中广告点击的生力军，消费能力强，所以你必须照顾到他们的感受。</p>
<p>我对IE6恨之入骨的重要原因之一，恐怕就是对PNG各种半透明的支持情况了。我们在其他浏览器可以轻松实现的图片半透明效果，到了IE6这儿就得纠结蹉跎，虽然IE6勉强的支持PNG-8格式的伪半透明，但这个和GIF图片的效果相差并不大，如果你使用PNG-32的话，你所有的半透明区域都会变成灰底。</p>
<p>网上有不少IE6上实现PNG半透明的工具，各有千秋，大多数使用了IE的一个滤镜：AlphaImageLoader，使用后会有各种诸如问题（比如background-position和background-repeat属性支持的不完善，有些还会擅自更改背景图片的尺寸）。<a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/" target="_blank">DD_belatedPNG</a>提供了一种新的选择，他使用微软的VML语言对PNG图片进行重新绘制，以达到半透明的效果，并且能支持background-position和background-repeat属性。</p>
<p><a href="http://d.interjc.net/lab/DD_belatedPNG/" target="_blank">查看Demo</a> | <a href="http://interjc.googlecode.com/files/DD_belatedPNG.zip" target="_blank">打包下载</a></p>
<p>其使用方法也不难，先在<a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/DD_belatedPNG_0.0.8a-min.js">此下载DD_belatedPNG</a> ，然后插入head标签中：</p>
<div>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;!--</span><span style="color: #009900;">&#91;</span><span style="color: #000000; font-weight: bold;">if</span> IE <span style="color: #cc66cc;">6</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;DD_belatedPNG_0.0.8a-min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> 
DD_belatedPNG.<span style="color: #006633;">fix</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.png'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;!</span><span style="color: #009900;">&#91;</span>endif<span style="color: #009900;">&#93;</span><span style="color: #339933;">--&gt;</span></pre></div></div>

</div>
<p>将所有需要需要修补的元素加上class=”png”即可</p>
<p>PS：对于:focus和:hover伪类，则需要将以上代码中的 :<br />
<strong>DD_belatedPNG.fix(&#8216;.png&#8217;);</strong><br />
修改为 :<br />
<strong>DD_belatedPNG.fix(&#8216;.png,a.png:hover,.png:focus&#8217;);</strong></p>
<p>BTW：虽然这样可以缓解IE6下PNG的问题，不过会带来性能问题，还有一些其他的问题，自然是不如对png半透明有原生支持的浏览器的。所以，赶快让该死的IE6下地狱吧。阿门！</p>
<hr /><h2>评论</h2><ul><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2010/09/05</a>, <a href='http://www.qypark.net' rel='external nofollow' class='url'>夏小淚</a> 说: 我现在都推荐我身边的朋友使用chrome或是FF,有些不会用的，就把IE6直接升级IE8了~！！</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2010/09/08</a>, <a href='http://interjc.net' rel='external nofollow' class='url'>interjc</a> 说: @夏小淚, good job！</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2010/09/10</a>, <a href='http://www.gold4rs.biz' rel='external nofollow' class='url'>Runescapegold</a> 说: ie6很少有人用了</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2010/09/10</a>, <a href='http://hjyl.org' rel='external nofollow' class='url'>皇家元林</a> 说: 你那个链接前面的图标是怎么加上去的？而且只是链接有，图片没有呢？</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2010/09/10</a>, <a href='http://interjc.net' rel='external nofollow' class='url'>interjc</a> 说: @皇家元林, 神奇吧，哈哈～ jquery+css...</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2010/09/10</a>, <a href='http://hjyl.org' rel='external nofollow' class='url'>皇家元林</a> 说: 能教教我吗？谢谢！</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2010/09/10</a>, <a href='http://interjc.net' rel='external nofollow' class='url'>interjc</a> 说: @皇家元林, 这个说来话长啊，你可以看我的源码中文哦style.css和javascript.js，搜索more-link看相关代码..</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2010/11/24</a>, <a href='http://bnuzt.org' rel='external nofollow' class='url'>Tao Zhu</a> 说: 想消灭IE6的最好方法就是尽快让XP滚蛋！</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2011/11/07</a>, 张垒 说: 加入JS代码后，用IE8打开网页时，提示参数无效。不知道怎么解决，您有什么方法吗？</li><li><a href="http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html">2011/11/08</a>, <a href='http://interjc.net' rel='external nofollow' class='url'>interjc</a> 说: @张垒, 这玩意儿只在IE6菜生效啊，检查下你代码的全角半角什么的看看。</li></ul><hr /><small>Copyright &copy; interjc.net 2009
<br /> </small>]]></content:encoded>
			<wfw:commentRss>http://interjc.net/archives/2010/07/10/fix-ie6-png-with-dd_belatedpng.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

