ie6-9 version Browser CSS hack If statement operation it is necessary to reiterate

Source: Internet
Author: User

1. css If hack conditional syntax
<!--[if ie]> only IE <! [endif]-->
Only all win systems are self-identifying with IE
<!--[if IE 5.0]> only IE 5.0 <! [endif]-->
Only ie5.0 can identify
<!--[if GT ie 5.0]> only ie 5.0+ <! [endif]-->
ie5.0 shifting ie5.5 can be identified
<!--[if LT ie 6]> only ie 6-<! [endif]-->
Only IE6 recognizable
<!--[if GTE ie 6]> only ie 6/+ <! [endif]-->
IE6 and ie5.x below IE6 are recognizable

<!--[if LTE IE 7]> only IE 7/-<! [endif]-->
Only IE7 recognizable
<!--[if GTE ie 7]> only ie 7/+ <! [endif]-->
IE7 and IE6, ie5.x below IE7 are recognizable

<!--[if IE 8]> only ie 8/-<! [endif]-->
Only IE8 recognizable

<!--[if IE 9]> only ie 9/-<! [endif]-->
Only IE9 recognizable

Note: After if plus LT GTE have different effects (join other parameters the same)

    • <!–[if ie 8]> = IE8 only IE8 recognizable
    • <!–[if lt ie 8]> = IE7 or lower version

<!–[if GTE ie 8]> = above or equal to IE8 version

2. DIV+CSS instances
CSS instance one:
Let IE6-IE8 display different content, the div CSS code is as follows:

<!doctype html>

Div+css Example Two : Description: The above for different IE display different Web content Div+css instance experiment.

Let IE6-IE8 display different CSS style effects, the div CSS code is as follows:

<!doctype html>

Note: The above experiment only experiment ie6-ie9 under if hack.

ie6-9 version Browser CSS hack If statement operation it is necessary to reiterate

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.