IE8 CSS hack

Source: Internet
Author: User
The official version of IE8 has been coming out for a while, but there are few CSS hack for the official version of IE8. In fact, this is fortunate because IE8 has fixed many bugs in IE6 and IE7, closer to W3C standards.

CSS hack for the official IE8 version can be found in two types:

First: "\ 9 ″:

Basic statement:

1. . Test {color /*\**/ : Blue \ 9 }

IE6, IE7, and IE8 can both be identified. However, IE8 cannot recognize CSS hack of "*" and "_". Therefore, we can write hack as follows:(Reprinted

1. . Header { Width : 300px ;} /* All browsers */ 2. . Header {width /*\**/ : 330px \ 9 ;} /* All IE browsers */ 3. . Header {* Width : 310px ;} /* IE7 and IE6 can be identified, while IE8 and FF cannot */ 4. . Header { _ Width : 290px ;} /* IE6 can recognize, IE7, IE8, and FF cannot recognize */

The second method is to use the conditional annotation of IE.

For details, refer to http://www.css88.com/archives/705;

Other CSS hack tests: 1. . Color 1 { Color : # F00 ; Color /*\**/ : # 00f /*\**/ } /* IE6, IE7, IE8, FF, op, and SA recognition */ 2. . Color 2 { Color : # F00 ; Color /*\**/ : # 00f /* \ 9 **/ } /* IE7, IE8, FF, op, and SA recognition */ 3. . Color 3 { Color : # F00 ; Color /*\**/ : # 00f \ 9 } /* IE6, IE7, and IE8 recognition */ 4. . Color 4 { Color : # F00 ; Color /*\**/ : # 00f \ 9 } /* IE7, IE8 recognition */ /* "Color" and "/* \ **/ There is a space between them */

OP indicates opera, sa indicates Safari

Refer:

Http://ladysign-apps.com/blog/archives/529

Http://webdevelop.nitamihai.com/ie8-css-hack/





difference between CSS hack-www.newcss.cn of IE6, IE7, IE8, and Firefox


test the cube hi.baidu.com/dpxdqx


IE6
IE7
IE8
firefox


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.