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]-->

相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息