网站前端教程

常用的CSSHack浏览器兼容写法

网站前端教程 51源码 2023-01-09 人阅读

都是我的站长站自用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]-->
上一篇:CSS全部标签属性重置语法 下一篇:CSS样式引入link和@import区别 栏目分类

帝国CMS教程

织梦cms教程

discuz教程

ecshop教程

phpcms教程

wordpress教程

苹果cms教程

php教程

数据库教程

微信小程序教程

python教程

css教程

js教程

视频教程

电子书

热门推荐
版权声明:文章搜集于网络,如有侵权请联系本站,转载请说明出处:https://www.51yma.cn/jiaocheng/wwebqianduanjiaocheng/1021.html
文章来源:
标签