你的心如利箭 在风中笔直的飞翔
github DNS ALEXA CDN
jquery JS CSS CSS3 HTML5 svg php --- isux w3cplus

21270

  博客园  :: 首页  ::  ::  ::  :: 管理

http://www.css88.com/tool/hack/   浏览器HACKS   2015-4-16

http://www.cnblogs.com/yongzhi/articles/1392607.html   Css Hack汇总

http://www.cnblogs.com/visi_zhangyang/p/3325661.html   浏览器Hack演示  2015-10-15

http://baike.baidu.com/view/1119452.htm   baidu百科

http://www.cnblogs.com/lhb25/archive/2013/03/11/browser-css-js-hacks-browserhacks.html   史上最全的浏览器CSS&JS Hack手册

http://www.cnblogs.com/wolm/p/3624930.html   阅读:看第七题关于 浏览器的兼容性 的阐述 2015-3-25

 

IE示例

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8"/><!-- 文档显示模式默认为ie8 -->
    <!--[if gte IE 8]>
    <style type="text/css">
        body {color:#ff0000;background-color:#000000;}
    </style>
    <![endif]-->

    <!--[if lt IE 8]>
    <style type="text/css">
        body {color:#000000;background-color:#ffffff;}
    </style>
    <![endif]-->
</head>
<body>
    <h1>
    <!--[if gte IE 8]>
        第 111111111111111 章。(IE9、IE8能显示)
    <![endif]-->
    </h1>
    <h1>
    <!--[if lt IE 8]>
        第 222222222222222 章。(IE7、IE5能显示)
    <![endif]-->
    </h1>
        第三章:将看到任何版本的文本。
</body>
</html>

 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<!--[if lt IE 9]>
      <script>alert("在IE5、6、7、8中,会alert本信息");</script>
<![endif]-->
</body>
</html>

 

摘抄

from:http://blog.jobbole.com/38638/

/* CSS属性级Hack */
color:red; /* 所有浏览器可识别*/
_color:red; /* 仅IE6 识别 */
*color:red; /* IE6、IE7 识别 */
+color:red; /* IE6、IE7 识别 */
*+color:red; /* IE6、IE7 识别 */
[color:red; /* IE6、IE7 识别 */
color:red\9; /* IE6、IE7、IE8、IE9 识别 */
color:red\0; /* IE8、IE9 识别*/
color:red\9\0; /* 仅IE9识别 */
color:red \0; /* 仅IE9识别 */
color:red!important; /* IE6 不识别!important 有危险*/

/* CSS选择符级Hack */
*html #demo { color:red;} /* 仅IE6 识别 */
*+html #demo { color:red;} /* 仅IE7 识别 */
body:nth-of-type(1) #demo { color:red;} /* IE9+、FF3.5+、Chrome、Safari、Opera 可以识别 */
head:first-child+body #demo { color:red; } /* IE7+、FF、Chrome、Safari、Opera 可以识别 */
:root #demo { color:red\9; } : /* 仅IE9识别 */

/* IE条件注释Hack */
<!--[if IE 6]>此处内容只有IE6.0可见<![endif]-->
<!--[if IE 7]>此处内容只有IE7.0可见<![endif]-->

posted on 2014-09-18 09:47  bjhhh  阅读(233)  评论(0编辑  收藏  举报