惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
TaoSecurity Blog
TaoSecurity Blog
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
SegmentFault 最新的问题
T
Troy Hunt's Blog
N
News and Events Feed by Topic
雷峰网
雷峰网
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
PCI Perspectives
PCI Perspectives
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 三生石上(FineUI控件)
Schneier on Security
Schneier on Security
T
The Exploit Database - CXSecurity.com
L
LINUX DO - 最新话题
V
V2EX
T
Threat Research - Cisco Blogs
人人都是产品经理
人人都是产品经理
C
Cisco Blogs
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
I
Intezer
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
月光博客
月光博客
Recent Commits to openclaw:main
Recent Commits to openclaw:main
N
News | PayPal Newsroom
Cyberwarzone
Cyberwarzone
B
Blog
博客园 - 聂微东
P
Palo Alto Networks Blog
A
About on SuperTechFans
The Last Watchdog
The Last Watchdog
Scott Helme
Scott Helme
Google DeepMind News
Google DeepMind News
Webroot Blog
Webroot Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
O
OpenAI News
C
Check Point Blog
Hacker News: Ask HN
Hacker News: Ask HN
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
博客园 - 【当耐特】
有赞技术团队
有赞技术团队
A
Arctic Wolf

博客园 - 廖勇军

关于c++的头文件依赖 增强资源管理器右键功能,含源代码 VC中结构体的内存布局 进程间共享句柄三种方式 SocanCode连接Oracle的方法 SocanCode7之模板编写 不用再纠结反射影响效率了 javascript总结 IIS7.0中使用MVC3,静态页正常,其它404 ashx的使用 iis express感觉还不错 关于sqlite使用entity framework的布署问题 - 廖勇军 - 博客园 负margin实现div的左右排版 原来Jquery.load的方法可以一直load下去 错误1067进程意外终止 关于省市联动的问题想法 javac编译多个带package文件 远程服务器返回了错误 NOTFOUND Java程序放到Linux上出现的问题
一起来灭掉IE6!
廖勇军 · 2011-04-30 · via 博客园 - 廖勇军

相信写过网页的,无不对IE6恨之露骨,没办法,无数GHOST装XP,直接就是IE6,这部分用户还是那么可观啊。有时候真想不兼容IE6了,直接给个“你用的浏览器太低级,请升级”的提示。如果你的网页已经完成,却发现IE6显示乱了,而你实在不想去兼容了,那就加一段下面的代码吧,为消灭IE6做点贡献。

1、html结束后,加代码

<!--[if lte IE 6]>
<style type="text/css">
    #ie6-warning {text-align: center; background: red; filter: alpha(opacity=50); position: absolute; top: 0; left: 0; font-size: 12px; width: 100%; padding: 2px 0; }
    #ie6-warning a {text-decoration: none; color: #fff; }
</style>
<div id="ie6-warning">
    <a href="http://www.microsoft.com/china/windows/internet-explorer/" target="_blank">
        您正在使用 Internet Explorer 6,低版本的IE浏览器在本页面的显示效果可能有差异。 点击这里升级到 Internet Explorer 8
    </a>
</div>
<script src="@Url.Content("~/Scripts/IE8.js")" type="text/javascript"></script>
<script type="text/javascript">
    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]-->

2、如果顶端是flash的话,加上这行,让它透明。否则不用

<param name="wmode" value="transparent" />

完成以上工作后,用户用IE6打开,就会在顶端浮动一行文字提示,能提示用户又不影响正常浏览,真希望所有的网站都在用户使用IE6的时候都这样做,为快速消灭IE6做份贡献!