Frontend design: IE6/IE7/IE8/IE9/FF hack

Source: Internet
Author: User

HACK principle: different browsers recognize different characters

Special Character Recognition tables are commonly used in CSS:

(1 )*:IE6 + IE7Yes, but the standard browser FF + IE8 cannot recognize;

(2 )! Important:
Except IE6, it cannot be recognized! Outside important,FF + IE8 + IE7Yes! Important;

(3) _: DivisionIE6Supported _ external, FF + IE8 + IE7 are not supported _;

(4) \ 9: AllIERecognize all browsers (IE6, IE7, IE8, and IE9)

Example:

(1) Difference between FF (IE8) and IE6 IE7

Backgorund: orange; FF and IE8 background colors will be orange

* Backgorund: red; the background colors of IE6 and IE7 will be red.

(2) Difference between FF (IE8) and IE6 and IE7

Background: orange; FF and IE8 background colors will be orange

* Background: red! Important; IE7 background color will be red

* Background: blue; the background color of IE6 is blue.

(3) Difference between FF (IE8) and IE6 and IE7

Background: orange; FF and IE8 background colors will be orange

* Background: red; the background color of IE7 is red.

_ Background: blue; IE6 background color will be blue

(4) Difference between FF and IE6 IE7 IE8 IE9

Color: gray; FF and other non-IE browser font colors will be gray

Color: red \ 9; IE8 IE9 font color will be red

* Color: green; The IE7 font color will be green

_ Color: blue; IE6 font color will be blue

Tip:CSS
HACK writing sequence: first write the style required by FF and other non-ie browsers, then write the style required by IE8, then IE7, and then IE6!

Summary:In practice, I feel less useful! Important
As long as you remember "*" and "_", I think it is enough to distinguish FF (IE8) from IE6 and IE7.

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.