Major browser hack

Source: Internet
Author: User

IE6: "*" _ "underline": MyClass {_background:red;}

"*" asterisk: Format:. myclass{*background:red;}

IE7: "*" asterisk format:. myclass{*background:red;}

*+html format: *+html. myclass{background:red;}

+ format:. myclass{+background:red;}

!important format:. myclass{background:red!important;}

IE8: Format:. myclass{background:red\0;} /* is left to IE8, the latest version of opera also know, the back of their own hack wrote to opera, so, we think it is to IE8 stay;

IE9: \9\0è format:. myclass{background:red\9\0;}

: Root plus \9è format:: Root. myclass{background:red\9;}

IE10: @media screen and (-ms-high-contrast:active), (-ms-high-contrast:none) {

/* ie10-specific styles go here */}

Firefox: @-moz-document Url-prefix () {. font1 {color:red}}/* for Firefox browsers */

Opera: @media All and (min-width:0px) {#test {background-color:black\0;}} This is the Magic Opera, which is always with IE, and must be added as a plus, or Firefox, Chrome,safari also know ...

Chrome/safari: @media screen and (-webkit-min-device-pixel-ratio:0) {#test {background-color:gray;}} Finally this is the browser upstart Chrome and Safari.

Summary: 1, IE6, IE7 all support *, but IE8 finally return to the Orthodox, give up the support of *

2, IE7, IE8, Firefox, Opera, Safari all support!important

3, Browser priority level: Ff<ie7<ie6,css hack, follow the writing order is generally FF IE7 IE6

4, IE9 hack currently ie10 is also suitable for

Major browser hack

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.