Loading different css solutions for different browsers at different resolutions

Source: Internet
Author: User

The browsers of different IE versions have different interpretations of the WEB standard pages we have created. Specifically, they have different interpretations of CSS. To be compatible with these, we can use conditional annotations for their respective definitions, to achieve compatibility. For example:

<! -First, use the css.css style sheet.->

<Link rel = "stylesheet" type = "text/css" href?”css.css "/>

<! -[If IE 7]>

<! -If the iebrowser version is "7", use the ie7.css style sheet.->

<Link rel = "stylesheet" type = "text/css" href?”ie7.css "/>

<! [Endif]->

<! -[If lte IE 6]>

<! -If the iebrowser is smaller than or equal to 6, use the ie.css style sheet.->

<Link rel = "stylesheet" type = "text/css" href?”ie.css "/>

<! [Endif]->

This differentiates the implementation of CSS by IE7 and IE6 to achieve compatibility. At the same time, the first line of CSS is compatible with other non-ie browsers.

Note: The default CSS style should be located at the first line of the HTML document. All the content for condition annotation judgment must be located after the default style.

This is also the so-called css hack technology...

Related Article

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.