破洛洛文章簡介:css hack .
.class {
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 ---*/