Switch from terminal: CSS hack of IE8

Source: Internet
Author: User

First of all, thanks to"Wanzi"CSS hack provided by IE8;

Those who have followed IE8's CSS hack believe that everyone is using this hack, which is the CSS hack of "\ 9:

. Test {
Color: #000000;/* ff, OP supported */
Color: # 0000ff \ 9;/* all IE browsers (IE6 +) support; however, IE8 cannot recognize "*" and "_" CSS hack; so we can write hack */
[Color: #000000; color: #00ff00;/* SF, CH support */
* Color: # FFFF00;/* IE7 supported */
_ Color: # ff0000;/* IE6 support */
}

This is also used by myself 《CSS hack of mainstream browsers.

Many people study why the IE6-IE8 in color: # 0000ff \ 9; supports "\ 9" writing, and its principle. I am just an engineer, not a scientist, I don't know why or why it really works! Very ashamed!

Return to CSS hack of IE8 and talk about color: # 0000ff \ 9:

Color: # debuff \ 9 hack supports IE6-IE8 (other versions are not tested), but IE8 does not recognize "*" and "_" CSS hack, so we can use

Color: # 0000ff \ 9;/* IE6, IE7, IE8 */

* Color: # FFFF00;/* IE7 */

_ Color: # ff0000;/* IE6 */

To distinguish ie versions.

I do not know why "\ 9" is used, but"WanziThe other 0-13 numbers are tested. The final result is as follows:

OP indicates opera, sa indicates safari, and CH indicates chrome. If you have patience, you can test "\ 14", "\ 15", and "\ 16 "...

From the test results above, we can see that "\ 0" is only recognized by IE8, IE6, and IE7 are not recognized, so "\ 0" should be the real hack of IE8. CSS hack of mainstream browsers is better:

. Test {
Color: #000000;/* ff, OP supported */
Color: # 0000ff \ 0;/* IE8 supported */
[Color: #000000; color: #00ff00;/* SF, CH support */
* Color: # FFFF00;/* IE7 supported */
_ Color: # ff0000;/* IE6 support */
}

OP indicates opera, sa indicates safari, and CH indicates chrome;
I only share resources. I am not confused.

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.