访问此页,http://www.07q.net/diuie6.html(直接保存页面源代码即可)
IE6最早在2001年8月发布,在2009年4月14日光荣退休,但扩展支持依然要到2014年,它的寿命之长,是浏览器发展史上的奇迹。
前些天WordPress 宣布放弃对 IE6 的支持 ,不只是WP,很多网站陆续的对IE6不再兼容,但在中国使用IE6浏览器的依然有许多,这就导致界面架构师每做完一个网站就要查看其在各浏览器的兼容,最为万恶IE6最让人头疼,你懂得,所以站长们,行动起来吧,为早日灭掉IE6做点贡献。
你可以在网页中放上检测IE6的代码并提示升级(很简单的小提示,有更好的欢迎大家提供)
head部分:
1 2 3 4 5 | <style type="text/css"> #ie6-warning{background:#FF0; position:absolute;top:0; left:0;font-size:12px; line-height:24px; color:#F00;padding:0 10px;} #ie6-warning img{float:right; cursor:pointer; margin-top:4px;} #ie6-warning a{text-decoration:none;} </style> |
body部分:
<!–[if lte IE 6]>
<div id=”ie6-warning”>
<img src=”x.gif” width=”14″ height=”14″ onclick=”closeme();” alt=”关闭提示” />您正在使用 Internet Explorer 6 低版本的IE浏览器。为更好的浏览本页,建议您将浏览器升级到 <a href=”http://www.microsoft.com/china/windows/internet-explorer/ie8howto.aspx” target=”_blank”>IE8</a> 或以下浏览器:<a href=”http://www.firefox.com.cn/download/”>Firefox</a> / <a href=”http://www.google.cn/chrome”>Chrome</a> / <a href=”http://www.apple.com.cn/safari/”>Safari</a> / <a href=”http://www.Opera.com/”>Opera</a>
</div>
<script type=”text/javascript”>
function closeme()
{
var div = document.getElementById(“ie6-warning”);
div.style.display =”none”;
}
function position_fixed(el, eltop, elleft){
// check if this is IE6
if(!window.XMLHttpRequest)
window.onscroll = function(){
el.style.top = (document.documentElement.scrollTop + eltop)+”px”;
el.style.left = (document.documentElement.scrollLeft + elleft)+”px”;
}
else el.style.position = “fixed”;
}
position_fixed(document.getElementById(“ie6-warning”),0, 0);
</script>
<![endif]–>
这个不错,早就应该把ie6fuck了