都是我的站长站自用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教程
视频教程
电子书
热门推荐- 01 IE不显示加载iconfont阿里巴巴图标的解决方法 377热度
- 02 CSS文字超出省略号显示 318热度
- 03 分享IE6 PNG 透明的几种方法 244热度
- 04 为什么bootstrap国内很少人使用 241热度
- 05 CSS定位控制上下左右坐标教程 210热度