(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