CSS Hack

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

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

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

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

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

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

 

IE示例

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

<!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 章。(IE九、IE8能显示)
    <![endif]-->
    </h1>
    <h1>
    <!--[if lt IE 8]>
        第 222222222222222 章。(IE七、IE5能显示)
    <![endif]-->
    </h1>
        第三章:将看到任何版本的文本。
</body>
</html>

 

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

 

摘抄

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

/* CSS属性级Hack */
color:red; /* 全部浏览器可识别*/
_color:red; /* 仅IE6 识别 */
*color:red; /* IE六、IE7 识别 */
+color:red; /* IE六、IE7 识别 */
*+color:red; /* IE六、IE7 识别 */
[color:red; /* IE六、IE7 识别 */
color:red\9; /* IE六、IE七、IE八、IE9 识别 */
color:red\0; /* IE八、IE9 识别*/
color:red\9\0; /* 仅IE9识别 */
color:red \0; /* 仅IE9识别 */
color:red!important; /* IE6 不识别!important 有危险*/ip

/* 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识别 */utf-8

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

相关文章
相关标签/搜索
本站公众号
   欢迎关注本站公众号,获取更多信息