Enable IE to support CSS3 Media query for Responsive web design

Source: Internet
Author: User

Today's screen resolution, as small as 320px (IPhone), large to 2560px or even higher (large display), the range is great. In addition to the use of traditional desktops, users will be more and more throughMobile Phone, netbooks, ipad-type tablet devices to browse the page. In this case, the fixed width of the design will appear more unreasonable. The page needs to be more adaptable, and its layout structure should be adjusted to respond to different devices and screen resolutions. NextI'mWe will look at how to passHTML5AndCSS3Media Queries (media query)-related technologies to enable cross-device, cross-browser responseWebDesign solutions.
We need to call the Css3-mediaqueries.js file in the page to help IE8 or the previous version support CSS3 media queries:

<!--[if LT IE 9]><script src= "Http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js" ></script><! [endif]-->

Next, we'll create a CSS style sheet and call it in the page:

<link href= "Media-queries.css" rel= "stylesheet" type= "Text/css" >

Elastic picture

img {max-width:100%;height:auto;width:auto9;/* IE8 */}

Elastic inline Elements (video)

. Video Embed,.video Object,.video iframe {width:100%;height:auto;}

Problem with font size auto-adjustment (Disable auto-resizing of safari in iphone via-webkit-text-size-adjust:none)

HTML {-webkit-text-size-adjust:none;}

Problem with page width scaling

<meta name= "viewport" content= "Width=device-width, User-scalable=no, initial-scale=1.0; maximum-scale=1.0; user-scalable=0; " >

Enable IE to support CSS3 Media query for Responsive web design

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.