CSS Hack(Safari、Opera、Chrome、IE6、IE7、 IE8和IE9)
來源:http://hi.baidu.com/juziyou11/item/6927b4fdbd3283753d198b96
background: #CCCCCC;
background: #CCCCCC!important;?/*--- Firefox、IE7---*/
background-color:red\0;??/*-- ie 8/9--*/
background-color:blue\9\0;??/*-- ie 9--*/
*background: #CCCCCC;?/*---IE7---*/_background: #CCCCCC;?/*---IE6---*/
}
.all-IE{property:value\9;}
:root .IE-9{property:value\0/;}
.gte-IE-8{property:value\0;}
.lte-IE-7{*property:value;}
.IE-7{+property:value;}
.IE-6{_property:value;}
.not-IE{property//:value;}
@-moz-document url-prefix() { .firefox{property:value;} }
@media all and (-webkit-min-device-pixel-ratio:0) { .webkit{property:value;} }
@media all and (-webkit-min-device-pixel-ratio:10000),not all and (-webkit-min-device-pixel-ratio:0) { .opera{property:value;} }
@media screen and (max-device-width: 480px) { .iphone-or-mobile-s-webkit{property:value;} }
?
/*---IE7---*/*:first-child +html .class {
background: #CCCCCC;
}
/*---IE6---*/
*html .class {
background: #CCCCCC;
}
@media all and(min-width:0){
.class{
background: #CCCCCC;?/*---Opera---*/
}?
}
@media all and (min-width:0){
.class{
background: #CCCCCC;}?/*---Opera and Sa ---*/
html* .class{
background: #CCCCCC;?/*---Sa---*/
}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {.class{background: #CCCCCC;}}?
/* ---Safari,chrome and Opera ---*/
總結
以上是生活随笔為你收集整理的CSS Hack(Safari、Opera、Chrome、IE6、IE7、 IE8和IE9)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python中str和repr有什么区别
- 下一篇: html中字体,特殊字符和标签如何显示呢