Using Jqmobi to develop app basics: Viewport directives

Source: Internet
Author: User

ViewPort directives are often used in mobile app development, ViewPort <meta> tags are used to specify whether a user can scale a Web page, and if so, what is the maximum and minimum scaling scale. The content value of the ViewPort <meta> tag is a comma-delimited list of instructions and their values.

<meta name= "viewport" content= "Width=device-width, initial-scale=1,maximum-scale=1" >

The 1 width and height instructions Specify the logical width and height of the viewport, respectively. You can use a number in pixels, or you can use a special marker symbol.

The width directive uses the device-width tag to indicate that the viewport width should be the screen width of the device, and the height instruction uses the device-height tag to indicate that the viewport height is the screen height of the device.

The 2 initial-scale directive is used to set the initial scaling ratio of the Web page. The default initial scaling value varies depending on the smartphone browser. Typically, the device renders an entire Web page in the browser, and setting 1.0 displays the Web document without zooming.

The 3maximum-scale and Minimum-scale directives are used to set the user's limit on the scale of web pages. Values range from 0.25 to 10.0. As with Initial-scale, the value of these directives is the scaling ratio applied to the viewport content.

The 4user-scalable directive specifies whether the user can scale the viewport, which is the view that scales the Web page. Allows the user to zoom when the value is yes, and no scaling is allowed when the value is no.

Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/

Reference

Reference

Author: csdn Blog xuexiaodong2009

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.