Development of their own web site, on the mobile phone, always a small piece of the whole, not very good to adapt to the screen, each time to use their fingers to enlarge to the appropriate size, and found that the need to add in the development code:
<meta name= "viewport" content= "Width=device-width, initial-scale=1" > (can be added to the first line)
Parameter description:
The height of the width-viewport width height-viewport
Initial-scale-Initial scaling ratio
Minimum-scale-The minimum scale that allows the user to scale
Maximum-scale-Allows the user to zoom to the maximum scale
User-scalable-whether the user can scale manually
This parameter describes the reference: http://www.2cto.com/kf/201308/240021.html
If you want to open a Web page automatically in the original proportions and do not allow the user to modify, you are:
<meta name= "viewport" content= "Width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, User-scalable=no "/>
================================================ [Another method]
Take this paragraph
<! DOCTYPE ........>
Replace with this paragraph
<! DOCTYPE HTML PUBLIC "-//wapforum//dtd XHTML Mobile 1.0//en" "Http://www.wapforum.org/DTD/xhtml-mobile10.dtd" >
Note: This method in the iphone horizontal screen when the width will exceed the screen width of the scroll bar, the solution is to add method one of the code
Reference: http://www.strongfire.cn/article/319.html
Author: csdn Blog Shell
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/web/Skills/