Web App Adaptive Solution Summary keywords elastic layout of REM

Source: Internet
Author: User

In summary, there are 5 kinds of adaptive layouts for mobile web apps, which are mature in turn.

0. Flexbox

With CSS3 Flexbox for layout, support for rich media and complex typography is very strong, not universal compatibility is very poor, almost no application in any project.

I. Flexible layout

Use EM or REM units for relative layout, and a more flexible relative% percentage, while supporting normal display of browser font sizing and zooming.

Two. Flow-through layout (FLUID)

Use% percent to define the width, most of the height is fixed with PX, can be based on the visible area (viewport) and the parent element of the real-time size adjustment, as far as possible to adapt to various resolutions. Often with max-width and other properties to control the size of the flow range to avoid too large or too small impact reading. Representative Fence System (grid system)

Three. Responsive layout (responsive)

Use @media media queries to switch different samples for devices of different sizes and media. The excellent response range is designed to give the device the best experience within the range, and the actual or fixed layout under the same device.

Four. Adaptive layout (Adaptive)

Typically, the use of @media media queries and grid systems (grid system) to layout with relative layout units, in fact, the integrated response, flow, and so on, the above-mentioned technology through CSS to a single page different devices return different styles of technology collectively. Adaptive has almost become the standard for excellent page layouts.

This article is mainly about the use of REM.

CSS3 introduced a new unit of length, Rem.

Rem:rem and EM units are a relative unit. The difference is that EM is calculated relative to the font-size of the element's parent element, and REM is relative to the font-size of the root element HTML. This allows REM to bypass complex hierarchical relationships and implement functions similar to EM units.

Compatibility: Ie9+,firefox, Chrome, Safari, Opera mainstream versions are supported.

Web App Adaptive Solution Summary keywords elastic layout of REM

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.