Solve @media screen (adaptive) IE browser incompatibility issues

Source: Internet
Author: User

1. Resolve Compatibility issues

(1) The top of the page must be defined:<! DOCTYPE html>

(2) Click: Download Respond.js file

(3) Introduce <script src= "Respond.js" ></script>;respond.js must be referenced after the style sheet:

(4) The page must be running in a server environment, and it cannot be opened directly.

2. Use CSS3 to determine the size of the window to set different styles:

As an example:

/* When width is less than 500px; background is red */

@media screen and (max-width:500px) {

body{background:red;}

}

/* width between 500px-800px; background is blue */

@media screen and (min-width:500px) and (max-width:800px) {

Body{background:blue;}

}

/* When width is greater than 800px; background is green */

@media screen and (min-width:800px) {

Body{background:green;}

}

Note here that the style must be a reference to the external style, directly written on the page can not

You can click: instance download, I have done and tested the instance.

Originating From: Http://www.bjishu.com/using-ie-css3htc-make-compatible-response-page

Solve @media screen (adaptive) IE browser incompatibility issues

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.