Screen adaptation problems in mobile Web development

Source: Internet
Author: User
1, first screen size is the screen diagonal length size is fixed 2, the development of units relative units encountered (that is, relative to the screen): PX Em pt absolute units (fixed size, regardless of the device screen): In cm3, pixel density pixel density refers to the number of pixels inside 1 inches, For example, 1-inch inside is 10px, there are usually two kinds of 163 (3GS) (4s) is usually more than 320 pixel density is high-definition screen, calculation method: screen resolution of the square + screen resolution wide square, and then open the root, then divided by the screen inch. 4, the device independent pixel device independent pixels represent a ratio of real pixels and resolution pixels, such as 3gs mobile phone height 480px, width 320px resolution, real device height 480px, width 320px, that is, resolution and real pixels of the same time 1pt = 1px But there are some devices height 960px, width 640px, resolution. Real device height 480px, width 320px, that is, the resolution is twice times the true pixels, 1pt = 2px. 5, physical pixels and CSS pixels 1, physical pixels (resolution of pixels) 960*640 2, CSS pixel (real pixel) simulator see 320*5686, viewport 1, viewport: The browser's visible width in the PC side is subject to change by the browser window 2, Viewport on the PC side is visible window (will change), there will be a fixed value on the mobile side, but usually default 980, 3, but the default mobile side of the time 980 will cause the page zoom or scroll bar 4, solve the mobile default viewport will cause the page zoom and scroll bar, Setting the META tag setting defaults to the width of the viewport equal to the width of the device 5, other properties of the viewport initialize scaling initial-scale=1.0 whether the user is allowed to scale user-scaleable=no, maximum maximum-scale= 1.0; and the minimum scaling minimum-scale=1.0; 6, META:VP + TAB usually write the mobile page, the first should add a viewport.

Screen adaptation problems in mobile Web development

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.