让网站快速提醒用户升级IE6,letskillie6
如果您发现本文排版有问题,可以先点击下面的链接切换至老版进行查看!!!
让网站快速提醒用户升级IE6,letskillie6
不论你是不是Wordpress网站,你都可以在网站的head部分内添加如下的代码(这是简体中文版本,如果需要繁体中文,将zh_CN的部分换成zh_TW)。每当有IE6的用户访问你的网站时,都会在右下角发出提示(见下图)。而且这个提示非常人性化——只会出现一次,当用户选择关闭之后将不再出现。
使用的代码是借助googlecode,爱死google了
<!--[if IE 6]>
<script type="text/javascript" src="http://letskillie6.googlecode.com/svn/trunk/letskillie6.zh_CN.pack.js"></script>
<![endif]-->
以上是第一种方法
第二种我们也可以用代码来实现这一切
<!–[if lt IE 7]>
<div style=’border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;’>
<p></p>
<p>
<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>
</p>
<p>
<div style=’width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;’><br>
<div style=’width: 75px; float: left;’><img src=’http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg’ alt=’Warning!’ /></div><br>
<div style=’width: 275px; float: left; font-family: Arial, sans-serif;’><br>
<div style=’font-size: 14px; font-weight: bold; margin-top: 12px;’>You are using an outdated browser</div><br>
<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><br>
</div>
</p>
<p>
<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><br>
<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><br>
<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><br>
<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><br>
</div>
<![endif]–>
纯DIV+CSS
- 分类:
- Web前端
更新时间: