常用的CSSHack浏览器兼容写法

常用的CSSHack浏览器兼容写法
                     第一张

都是我的站长站自用CSSHack写法,随着浏览器的不断更新。目前来说,CSSHack也基本用不到了,大部分浏览器兼容性都很高了。

CSSHack写法

background-color:#000000;[ 所有识别 ]
background-color:#0000009; [ IE识别 ]
*background-color:#000000;[ IE6、7识别 ]
_background-color:#000000;[ IE6识别 ]
@-moz-document url-prefix() { background-color:#000000; }[ 火狐识别 ]
@media screen and (-webkit-min-device-pixel-ratio:0) { background-color:#000000; } [ Webkit识别 ]
@media all and (-webkit-min-device-pixel-ratio:10000),not and all (-webkit-min-device-pixel-ratio:0) { background-color:#000000; }[ Opera识别 ]

HTML内置写法

<!--[if IE]>此内容只有IE可见<![endif]-->
<!--[if IE6.0]>此内容只有IE6.0可见<![endif]-->
<!--[if !IE]>此内容除了IE之外都可见<![endif]-->
<!--[if !IE5.0]>此内容除了IE5.0之外都可见<![endif]-->
<!--[if gt IE6.0]>此内容IE6.0以上版本都可见<![endif]-->

本文结束

发表评论

登录... 评论区已永久关闭~