The latest CSS compatibility solution makes your style perfectly compatible with various browsers. This solution is mainly used to solve safari. opear tried it during the test, the results show that the same is true, so
Also solved by the way. :)
. E {/* FF op */
Background-color: # ff0000
}
HTML *. E {/* Sa IE7 op */
Background-color: # ff00ff
}
* + Html. E {
Background-color: #000000;/* op */
* Background-color: # 0000ff;/* IE7 */
}
* Html. E {/* IE6 */
Background-color: #00 FFFF
}
It has been tested by ff2, op9.21, op9.10, sa3.0.3 (PC), IE7, and IE6. If you have tested it in other browsers, please leave a message and tell me the result.
* Note that the style interpretation of IE7 is related to the DTD. IE7 can read the hack of IE6 without a DTD. *
**
Updated CSS
Hack is shown below, including FF, IE6, IE7, opear, and safari. It should be noted that due to the different rendering modes of IE on different DTD, the use of this hack should be noted that the page isNo, DTD or XML Declaration (<? XML
Version = "1.0" encoding = "UTF-8"?> ).
. Class {
Background-color: # FFFF00;/* all browsers */
* Background-color: #00ff00;/* ie */
_ Background-color: #00 FFFF;/* IE6 */
}
@ Media all and (min-width: 0 ){
. Class {
Background-color: # ff00ff;/* opera */
}/* Only opera recognition */
@ Media all and (min-width: 0 ){
. Class {
Background-color: # ff00ff;/* opera and Sa */
HTML *. Class {
Background-color: #808080;/* Sa */
}
}}
It has been applied in practical work. You are welcome to provide better solutions.