The first time you write a mobile page
1, basically in the head of the Web page we just add four meta tags to achieve a mobile site framework. Let me take a look at the meta tags.
<meta name= "viewport" content= "Width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
Detailed properties:
Width ---- viewport (width=device-width meaning: Width equals device width) height------viewport (height= Device-height means: Height equals device width) initial-scale-----The initial scaling minimum-scale-----The minimum scale that allows the user to zoom Maximum-scale----- Allows the user to zoom to the maximum scale user-scalable-----whether the user can scale manually
2. Prohibit numbers from being changed to phone numbers
<meta name= "format-detection" content= "Telephone=no"/>
In general, iOS and Android will default to a certain length of number as the phone number, even if not added will default to display as the phone, so, cancel this is necessary!
3. Safari private meta tag in iphone device
<meta name= "apple-mobile-web-app-capable" content= "yes"/>
It says: Allow full screen mode to browse, hide browser navigation
4. iphone private Label
<meta name= "Apple-mobile-web-app-status-bar-style" content= "Black" >
It specifies that the status bar style at the top of safari in the iphone defaults to default white to position black black and black-translucent (gray translucent)
<link rel= "apple-touch-icon-precomposed" href= "Http://3gimg.qq.com/wap30/info/info5/img/logo_icon.png" >
This is a personalized link tag, he supports the user to create a shortcut to the desktop icon for our own defined icon
Apple-touch-icon.png or Apple-touch-icon-precomposed.png, the former named iOS will automatically add rounded, shaded, and highlighted overlays for this icon, which will not add these effects.
II. Basic framework of mobile website Framework Code
<!doctype html>
Third, on the mobile site debugging problems
Generally we use: in the browser debugging + Real machine testing, because the browser is only a simulation tool, the actual development, we have to use the real machine to test.
For example: (Android phones, IPhone5, 5s, 6, 6Plus ...) )
And in the browser test, you can chrome (Google browser) F12 Debugging tools: There is a small phone-like icon, click to simulate the phone test.
Mobile page First attempt (i)