{
    分享网正式开通,我们为大家提供免费资源,欢迎大家踊跃投稿!

常用的CSSHack浏览器兼容写法

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

CSSHack写法

background-color:#000000;[ 所有识别 ]
background-color:#000000\9; [ 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]-->

资源均来自第三方,谨慎下载,前往第三方网站下载


米微资源分享网 , 版权所有丨本站资源仅限于学习研究,严禁从事商业或者非法活动!丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:常用的CSSHack浏览器兼容写法
喜欢 ()分享 (0)