Understanding of responsive layouts

Source: Internet
Author: User

Today I learned a bit of a responsive layout, some of the important methods and properties I'm here to share with you.

This is part of my case.

You see the above code: it is through the @media media query judgment to execute the CSS style, that is, you write a set of code, can now be adapted to the mobile phone, tablet, PC. Responsive layouts that are implemented through @media media queries.

Another important issue is that on mobile devices, we want to prohibit users from scaling the screen. If not prohibited, it may cause dislocation on the display, and the display is not the style of the mobile website. Therefore, we want to use code to prohibit the user to zoom the screen on the phone side, has reached the normal mobile website effect.

Code broken to: <meta name= "viewport" content= "width=device-width,initial-scale=1.0"/>

Let me say the pros and cons of a responsive layout:

Pros: 1. Flexibility in the face of different resolutions. 2. Can quickly solve multi-device display adaptation problems.

Cons: not fully compatible with all browsers, load time is long.

In fact, responsive layout and adaptive some similar places, such as: are detection equipment, according to different devices using different CSS, and CSS are used as a percentage, rather than fixed width.

The difference: The responsive template looks different on various devices, changes the presentation style as the device changes, and the adaptive does not, all devices look like a set of templates, but the length or the picture is smaller, not according to the device to adopt different display style.

The above is my understanding of the responsive layout, welcome comments, messages,

Understanding of responsive layouts

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.