Use CSS hack technology to solve browser compatibility issues.

Source: Internet
Author: User

/ * CSS attribute level hack */color:red;     /* All browsers can recognize */_color:red;    /* only IE6 identification */*color:red;    /* IE6, IE7 identify */+color:red;    /* IE6, IE7 identify */*+color:red;    /* IE6, IE7 identify */[color:red;    /* IE6, IE7 identify */color:red\9;    /* IE6, IE7, IE8, IE9 identify */color:red\0;    /* IE8, IE9 identify */color:red\9\0;    /* only IE9 identification */color:red; /* only IE9 identification */color:red!important; /* IE6 do not recognize!important details see */-------------------------------------------------------------//CSS selector level hack */*html #demo   {color:red;}  /* Only IE6 identify */*+html #demo {color:red;} /* Only IE7 recognize */body:nth-of-type (1) #demo {color:red;}/* ie9+, ff3.5+, Chrome, Safari, Opera can identify */head:first-child+body #dem o {color:red;}/* ie7+, FF, Chrome, Safari, Opera can recognize */:root #demo {color:red\9;}:/* only IE9 recognition */------------------------ --------------------------------------/* IE conditional comment hack details see * /<!--[If ie]> here the content is only IE visible <! [EndIf] - <!--[If IE 6]> content is only IE6.0 visible here <! [EndIf] - <!--[If IE 7]> content is only IE7.0 visible here <! [EndIf] - <!--[If GTE IE 6]> IE6 and IE6 above are recognized <! [EndIf] -<!--[If Lt IE 7]> IE7 and IE7 The following versions are recognized <! [EndIf] -<!--[If GTE IE 7]> IE7 and IE7 above are recognized <! [EndIf] -<!--[if! Ie]> Here the content is only non-ie visible <! [EndIf] - 

Use CSS hack technology to solve browser compatibility issues.

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.