CSS: Building responsive Web sites

Source: Internet
Author: User

    • To create a scalable image

IMG tags omit set width and height, set max-width:100% in the style sheet,

    • Create a resilient layout grid

The key to creating a resilient layout is to use percentages to set width instead of specifying a fixed width value

    • Media Enquiry

Defined by: 1) <link rel= "href=" "Media=" ">

2) @media screen and (max-width<960px) {} In the style sheet

The most common is the Min-width max-width

    • Understand visual areas and meta elements that use visual areas

The visual area (viewport) refers to the area where the browser displays the page.

<meta name= "viewport" content= "Width=device-width, initial-scale=1" >

    • Compatible with older versions

Determine the browser version with conditional comments and choose a different style sheet

<!--[if GT IE 8]><link ....> <! [endif]-->//In addition to IE8 and below versions, the style sheet used

<!--[if Lt IE 9]> <link ...> <! [endif]-->//For IE9 and the following versions

    

CSS: Building responsive Web sites

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.