About <meta name= "viewport" content= "width= device-width,user-scalable= 0,initial-scale= 1.0,minimum-scale= 1.0" >

Source: Internet
Author: User

<meta name= "Viewport" content= "
Width= Device-width,
user-scalable= 0,
initial-scale= 1.0,
minimum-scale= 1.0 ">

Width-viewport width height-viewport Height initial-scale-Initial zoom Minimum-scale-Allows user to zoom to the minimum scale Maximum-scale-allows the user to zoom to the maximum ratio us Er-scalable-whether the user can manually scale
Width

Controls the size of the viewport, you can specify a value or a special value, such as device-width as the width of the device (in pixels of the CSS when scaled to 100%).

Height

Corresponds to width, specifying the height.

Initial-scale

Initial scaling. That is, the initial zoom level of the page. This is a floating-point value, which is a multiplier of the page size. For example, if you set the initial zoom to "1.0", then the Web page will show up at 1:1 of the target density resolution. If you set it to "2.0", the page will be enlarged to twice times.

Maximum-scale

Maximum zoom. That is, the maximum allowable zoom level. This is also a floating-point value that indicates the maximum multiplier of the page size compared to the screen size. For example, if you set this value to "2.0", the page can be up to twice times larger than the target size.

User-scalable

The user adjusts the zoom. That is, whether the user can change the page zoom level. If set to Yes, the user is allowed to change it instead of No. The default value is yes. If you set it to No, then both Minimum-scale and Maximum-scale will be ignored because scaling is not possible at all.

All scaling values must be within the range of the 0.01–10.

Cases:

(Set screen width to device width, prevent users from manually resizing)

<meta name= "viewport" content= "Width=device-width,user-scalable=no"/>

(Set the screen density to high frequency, if, low frequency auto-scaling, prohibit the user to manually adjust the zoom)

<meta name= "viewport" content= "width=device-width,target-densitydpi=high-dpi,initial-scale=1.0, minimum-scale= 1.0, maximum-scale=1.0, User-scalable=no "/>

About <meta name= "viewport" content= "width= device-width,user-scalable= 0,initial-scale= 1.0,minimum-scale= 1.0" >

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.