Various browsers: hack and hack

Source: Internet
Author: User

Various browsers: hack and hack

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: \ 0 format :. myclass {background: red \ 0;}/* is reserved for ie8. The latest version of opera is also known, and its own hack is written to opera for recognition. Therefore, \ 0, we think it is left for ie8 ;*/

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}/* method for Firefox */

Opera: @ media all and (min-width: 0px) {# test {background-color: black \ 0 ;}} this is the magic opera that is always competing with ie to recognize \ 0. You must add \ 0. Otherwise, firefox, chrome, and safari will all know about it...

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

Conclusion: 1. Internet Explorer 6 and Internet Explorer 7 Support *, but Internet Explorer 8 has finally returned to the orthodox system and gave up support *.

2. Support for IE7, IE8, Firefox, Opera, and Safari! Important

3. browser priority: FF <IE7 <IE6, CSS hack. The writing order is generally FF IE7 IE6.

4. ie9 hack is also suitable for ie10

Related Article

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.