Best CSS hack Application Method

Source: Internet
Author: User

For IE6

Background-color: blue;
_Background-color: red;

If both IE7 and IE6 have problems
Select either of the following two:

Background-color: blue;
*Background-color: red;

Background-color: blue;
+Background-color: red;

If only IE7

Background-color: blue;
*Background-color: red;
_Background-color: Blue;/* restore IE6 */

For IE8

Background-color: blue;
Background-color: red\ 9;/* Used for IE6, IE7, IE8, and ie9 */
*Background-color: Blue;/* restore IE6, 7 */
Background-color: Blue\ 9 \ 0;/* Restore ie9 */

For ie9 

Background-color: blue;
Background-color: red\ 9 \ 0;/* Act on ie9 */
_Background-color: Blue;/* IE6 cannot be identified, so you need to restore IE6 ~ */

For the entire IE

Background-color: blue;
Background-color: red\ 9;

! Important

Used in all browsers-it cannot be regarded as hack! Important can ignore the CSS priority.

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.