CSS condition annotation theory and practice page 1/2, which must be known for div + CSS layout

Source: Internet
Author: User

The browser's condition annotation theory is explained in the following example.
(X) HTML
The following section Code Is to test the effect of the conditional comment statement in Microsoft's IE browser Copy code The Code is as follows: <! -- [If IE]>
<H1> you are using IE <! [Endif] -->
<! -- [If IE 5]>
<H1> Version 5 <! [Endif] -->
<! -- [If IE 5.0]>
<H1> Version 5.0 <! [Endif] -->
<! -- [If IE 5.5]>
<H1> Version 5.5 <! [Endif] -->
<! -- [If IE 6]>
<H1> Version 6 <! [Endif] -->
<! -- [If IE 7]>
<H1> Version 7 <! [Endif] -->

The following code is a condition comment for running in a non-IE browserCopy codeThe Code is as follows: <! -- [If! IE]> <! -->
<H1> you are not using Internet Explorer <! -- <! [Endif] -->
It eventually works in non-ie and special ie browsers
(Or use LTE lt or gt gte to determine, for example:
<! -- [If lte ie 6]>
Information displayed in IE 6
<! [Endif] -->
).

<! -- [If IE 6]> <! -->
<H1> you are using Internet Explorer version 6 <br/>
Or a non-IE browser <! -- <! [Endif] -->

from: http://www.cssplay.co.uk/menu/conditional.html
preview Model
the conditional annotation mentioned above is to determine the browser type and then define what content is displayed under what browser.
This dropmenu (drop-down menu) model comes from cssplay, which is made after many researches and repeated tests by the author. I want to use this model to illustrate the principle of conditional annotation.
first look at the simplest model

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.