设为首页收藏本站关注微信<<< 抵制 IE6 人人有责 >>>
搜索
热搜: 活动 交友 discuz
查看: 1396|回复: 0
打印 上一主题 下一主题

[WEB前端] IE6提示下载新的浏览器提示

[复制链接]
跳转到指定楼层
楼主
发表于 2015-8-30 20:29:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. <style type="text/css">
  2. #IE6_err{
  3. background:rgb(255,255,225) url("") no-repeat scroll 3px center;
  4. position:absolute;
  5. top:0;
  6. left:0;
  7. font-size:12px;
  8. color:#333;
  9. width:97%;
  10. padding: 2px 15px 2px 23px;
  11. text-align:left;
  12. }
  13. #IE6_err a {
  14. text-decoration:none;
  15. }
  16. </style>
  17. <!--[if lte IE 6]>
  18. <div id="IE6_err">您正在使用 Internet Explorer 6,在本页面的显示效果可能有差异。建议您升级到 <a href="http://www.microsoft.com/china/windows/internet-explorer/" target="_blank">Internet Explorer 8</a> 或以下浏览器: <a href="http://www.mozillaonline.com/" target="_blank">Firefox</a> / <a href="http://www.google.com/chrome/?hl=zh-tw" target="_blank">Chrome</a> / <a href="http://www.apple.com.cn/safari/" target="_blank">Safari</a> / <a href="http://www.operachina.com/" target="_blank">Opera</a>
  19. </div>
  20. <script type="text/javascript">
  21. function position_fixed(el, eltop, elleft){
  22. // check if this is IE6
  23. if(!window.XMLHttpRequest)
  24. window.onscroll = function(){
  25. el.style.top = (document.documentElement.scrollTop + eltop)+"px";
  26. el.style.left = (document.documentElement.scrollLeft + elleft)+"px";
  27. }
  28. else el.style.position = "fixed";
  29. }
  30. position_fixed(document.getElementById("IE6_err"),0, 0);
  31. </script>
  32. <![endif]-->
复制代码


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 转播转播 分享淘帖
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|手机版|Archiver|源于生活(个人生活娱乐工作的笔记)css3,html5,学习笔记    

GMT+8, 2024-5-4 21:01 , Processed in 0.078000 second(s), 27 queries .

Powered by Mr.Kevin-ying

© 2004-2015

快速回复 返回顶部 返回列表