抵制 IE6,从你我做起
当你越深入互联网,就会越憎恨 IE6,很明显,已经有太多的网页程序员对 IE6 恨之入骨,但也还是束手无措。就是这么一款土地掉渣的落后浏览器,凭借着叉P的强劲用户群依然有着25%的市场占有率。居然还有这么多不明真相的群众被蒙在鼓里,这是多么可怜可悲呀。我们作为 WordPress 平台的用户,好歹算是个个人站长,我们有权力有义务有责任捍卫互联网的和谐与先进性,让我们联起手来抵制 IE6 吧。看看当前有哪些向 IE6 Say No 的方法。
一、IE6 No More
方法:添加以下代码:
<!--[if lt IE 7]> <div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'> <div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div> <div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'> <div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div> <div style='width: 275px; float: left; font-family: Arial, sans-serif;'> <div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>You are using an outdated browser</div> <div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>For a better experience using this site, please upgrade to a modern web browser.</div> </div> <div style='width: 75px; float: left;'><a href='http://www.firefox.com' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div> <div style='width: 75px; float: left;'><a href='http://www.browserforthebetter.com/download.html' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div> <div style='width: 73px; float: left;'><a href='http://www.apple.com/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div> <div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div> </div> </div> <![endif]-->
效果如图:

二、Let's Kill IE6
方法:在</body>闭合前添加以下代码:
<!--[if lte IE 6]>
<script src="http://letskillie6.googlecode.com/svn/trunk/letskillie6.zh_CN.pack.js"></script>
<![endif]-->
<script src="http://letskillie6.googlecode.com/svn/trunk/letskillie6.zh_CN.pack.js"></script>
<![endif]-->
效果如图:

三、让用 IE6 的访客看到 WordPress 的默认主题
这招我没试验过,不过还挺婉转的,把 IE6 的访客直接绕到 WordPress 默认主题,已经有朋友也出了这个方法,还做了个插件,点此看详情。
四、Shockingly Big IE6 Warning 插件
这个方法和第三个有点类似,也是用插件,不需要自己加代码,而效果和第一个有点类似,是在网页头部加一个黄色的警告通知栏。官方下载页面。
不知道你还有什么抵制 IE6 的高招呢?还是彻底放弃 IE6 了吗?
-
WordPress 之万戈牌 Fuck IE6 插件2011年05月12日 -
Wordpress 手机专用插件2009年12月11日 -
拿起武器,将 IE6 收归帐下2009年09月1日 -
Wordpress之终极Gzip兼容IE62009年06月11日