<?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; anti_ie6</title>
	<atom:link href="http://interjc.net/tags/anti_ie6/feed" rel="self" type="application/rss+xml" />
	<link>http://interjc.net</link>
	<description></description>
	<lastBuildDate>Thu, 10 May 2012 01:31:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</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>
		<item>
		<title>反IE6代码</title>
		<link>http://interjc.net/archives/2009/09/06/anti-ie6.html</link>
		<comments>http://interjc.net/archives/2009/09/06/anti-ie6.html#comments</comments>
		<pubDate>Sun, 06 Sep 2009 15:05:10 +0000</pubDate>
		<dc:creator>interjc</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[anti_ie6]]></category>
		<category><![CDATA[ie6]]></category>

		<guid isPermaLink="false">http://interjc.net/?p=494</guid>
		<description><![CDATA[如果你用IE6访问本站会有一个简单的提示，请你升级浏览器，有兴趣的朋友可以参照一下方法： 打开你的Wordpress模板(此方法同样适用于其他所有支持自定义js以及html的模板)，找到&#60;/head&#62; ，在其之前插入以下代码： &#60;!--[if IE 6]&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&#34;&#62;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34;&#62; $(function(){ //anti IE6 $('#anti_ie6 p strong a').click(function(){ $('#anti_ie6').hide('slow'); }); }); &#60;/script&#62; &#60;style type=&#34;text/css&#34;&#62; #anti_ie6 { text-align:center; background:yellow; line-height:20px; font-size:14px; margin:5px 0; } #anti_ie6 p strong { padding:0 5px; } &#60;/style&#62; &#60;![endif]--&#62; 找到&#60;body&#62; ，在其后或其他合适位置添加以下代码： &#60;!--[if IE 6]&#62; &#60;div id=&#34;anti_ie6&#34;&#62;&#60;p&#62;尊敬的用户，您正在使用老掉牙的IE 6.0，我们强烈推荐您升级为&#60;a target=&#34;_blank&#34; href=&#34;http://bit.ly/2zx2V&#34;&#62;符合Web标准的浏览器&#60;/a&#62;，更快，更好，更安全！&#60;strong&#62;&#60;a href=&#34;#&#34;&#62;X&#60;/a&#62;&#60;/strong&#62;&#60;/p&#62;&#60;/div&#62; &#60;![endif]--&#62; 保存(上传)，就可以看到效果了。 [...]]]></description>
			<content:encoded><![CDATA[<p>如果你用<strong>IE6</strong>访问本站会有一个简单的提示，请你升级浏览器，有兴趣的朋友可以参照一下方法：<br />
打开你的Wordpress模板(<strong>此方法同样适用于其他所有支持自定义js以及html的模板</strong>)，找到&lt;/head&gt; ，在其之前插入以下代码：</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!--[if IE 6]&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){
//anti IE6
    $('#anti_ie6 p strong a').click(function(){
        $('#anti_ie6').hide('slow');
    });
});
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
#anti_ie6 {
	text-align:center;
	background:yellow;
	line-height:20px;
	font-size:14px;
	margin:5px 0;
}
#anti_ie6 p strong {
	padding:0 5px;
}
&lt;/style&gt;
&lt;![endif]--&gt;</pre></div></div>

<p>找到&lt;body&gt; ，在其后或其他合适位置添加以下代码：</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!--[if IE 6]&gt;
&lt;div id=&quot;anti_ie6&quot;&gt;&lt;p&gt;尊敬的用户，您正在使用老掉牙的IE 6.0，我们强烈推荐您升级为&lt;a target=&quot;_blank&quot; href=&quot;http://bit.ly/2zx2V&quot;&gt;符合Web标准的浏览器&lt;/a&gt;，更快，更好，更安全！&lt;strong&gt;&lt;a href=&quot;#&quot;&gt;X&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;
&lt;![endif]--&gt;</pre></div></div>

<p>保存(上传)，就可以看到效果了。</p>
<hr /><h2>评论</h2><ul><li><a href="http://interjc.net/archives/2009/09/06/anti-ie6.html">2009/09/09</a>, <a href='http://www.estoremap.com' rel='external nofollow' class='url'>Estoremap</a> 说: ie6已经很少了，呵呵，没关系</li><li><a href="http://interjc.net/archives/2009/09/06/anti-ie6.html">2009/09/09</a>, <a href='http://interjc.net' rel='external nofollow' class='url'>jc</a> 说: 我的访问记录有一半是IE6..</li><li><a href="http://interjc.net/archives/2009/09/06/anti-ie6.html">2009/09/09</a>, <a href='http://www.estoremap.com' rel='external nofollow' class='url'>Estoremap</a> 说: 怎么看不到留言了</li><li><a href="http://interjc.net/archives/2009/09/06/anti-ie6.html">2009/09/09</a>, <a href='http://interjc.net' rel='external nofollow' class='url'>jc</a> 说: ???哪</li><li><a href="http://interjc.net/archives/2009/09/06/anti-ie6.html">2009/10/14</a>, <a href='http://interjc.net/archives/2009/09/25/google-chrome-frame-come.html' rel='external nofollow' class='url'>Google Chrome Frame 来了 | 糖醋排骨</a> 说: [...] 作为一个对IE6深恶痛绝的人来说，这东东确实比较诱惑人，着实激动了一阵。 不过这个东西也不是无懈可击的，他的缺点也正是他的致命弱点——需要用户下载安装控件，而知道这个控件好处的早就不用IE了，至少也不用IE6了，不知道这个控件用途的压根就不会去下载并安装他，说不定还以为是病毒/流氓软件啥的，挺尴尬。希望Google能想个好办法来好好推广一下吧。 话说能不能让这事不由浏览者来决定，咱自己写网页的时候就把这事给办了呢？答案还是有的，不过估计是提升不了什么浏览器性能了，但至少能让IE系列也almost接近标准一把吧，这玩意儿就叫ie7-js，只要下载那个压缩包放在网站随意的位子，然后引用之，就可以解决很多问题了（经测试PNG的半透明效果依然没法在IE6实现），但至少写CSS的时候就省心多了。 也许想要IE6彻底消失，的等到Win7/8/9 出来并出现极其诱人的游戏或者应用吧，期待那一天的到来。 [...]</li><li><a href="http://interjc.net/archives/2009/09/06/anti-ie6.html">2010/02/01</a>, <a href='http://www.yuzepeng.com' rel='external nofollow' class='url'>GEZ鸽子</a> 说: 学习了！很有用！我也加入反IE6行列了！</li><li><a href="http://interjc.net/archives/2009/09/06/anti-ie6.html">2010/02/01</a>, <a href='http://interjc.net' rel='external nofollow' class='url'>interjc</a> 说: @GEZ鸽子, 恩，IE6相当讨厌..</li></ul><hr /><h2>延展阅读:</h2><ul><li><a href="http://interjc.net/archives/2009/09/25/google-chrome-frame-come.html" rel="bookmark" title="Permanent Link: Google Chrome Frame 来了">Google Chrome Frame 来了</a></li><li><a href="http://interjc.net/archives/2007/10/11/anti-spam.html" rel="bookmark" title="Permanent Link: 和Spam说再见">和Spam说再见</a></li><li><a href="http://interjc.net/a/anti-ie6" rel="bookmark" title="Permanent Link: 反 IE6">反 IE6</a></li></ul><hr /><small>Copyright &copy; interjc.net 2009
<br /> </small>]]></content:encoded>
			<wfw:commentRss>http://interjc.net/archives/2009/09/06/anti-ie6.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

