Mobile App Solutions

Source: Internet
Author: User

(1) Simple rough

If we make the page in 320px wide design, and do not make any settings, the page will automatically zoom to the width equal to the phone screen (this is because MEDIUM-DPI is the default value of target-densitydpi, and the different densities correspond to different scaling ratios, All of this is done automatically by mobile devices. So this solution is simple, rough, and effective. But there is a fatal drawback that for high-density and ultra-high-density mobile devices, pages (especially pictures) are distorted, and the more dense, the more distorted the distortion.

(2) Ultimate Perfection

In this scenario, we use target-densitydpi=device-dpi, so that mobile devices will be based on the actual number of pixels to render, in professional terms, is 1CSSpixels =1 device pixels. For example, 640* 960 of the iphone, we can make 640*960 pages, and there will be no scroll bars on the iphone. Of course, for other devices, you also need to make different sizes of pages, So the solution is often to use media queries to make responsive pages. This scheme can be rendered perfectly at a specific resolution, but with the more different resolutions to be compatible, the higher the cost, because individual code needs to be written for each resolution.

(3) Reasonable compromise

The vast majority of Android devices are high density, part of the density of the features, we can use a compromise scheme: we have 480px wide design manuscript to restore, but the page made of 320px wide (using background-size to reduce the image), and then, Let the page scale automatically proportionally. This way, low-density mobile phones have a scroll bar (which is basically no longer used), the density of mobile phones will waste a little bit of traffic, high-density mobile phone perfect presentation, ultra-high-density mobile phone slightly distorted (ultra-high-density Android phone very few). The advantages of this scheme are obvious: Just a set of design drafts, a set of code (this is just about Android phones).


Mobile App Solutions

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.