CSS hack: differentiate IE6, IE7, IE8, and Firefox

Source: Internet
Author: User

selector {
property: value; /* all browsers */
property: value \ 9;/* all IE browsers */
+ property: value;/* IE7 */
_ property: value;/* IE6 */
}

Of course, pay attention to the sequence. Based on the priority of CSS, the preceding statements show values for Firefox, IE8, IE7, and IE6 respectively.


<P class = "ie">
<Span style = "display: block; display: None \ 9;"> Hey, I used Firefox and blue. </Span>
<! -- [If IE 8]> pretty good, very advanced. Use IE8! The text is brown. <! [Endif] -->
<! -- [If IE 7]> you, IE7, red text! <! [Endif] -->
<! -- [If IE 6]> although green text is displayed, IE6 is not a good thing! <! [Endif] -->
</P>

Yes, it is the result of IE condition annotation + CSS. Let's take a look at the IE condition comments.

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.