Latest CSS compatibility Solution

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.