Avoid text font size reset
html{
-webkit-text-size-adjust:100%;
-ms-text-size-adjust:100%;
text-size-adjust:100%;
}
Second, the size of the viewport
For some older browsers you need to use the following code:
<meta name= "handeldfriendly" content= "true" >
For Microsoft's PocketPC, you need to use a special property setting
<meat name= "mobileoptimized" content= ">"
The complete code is as follows:
<meta name= "handeldfriendly" content= "true" >
<meta name= "mobileoptimized" content= ">"
<meta name= "viewport" content= "Width=device-width" >
In addition to about scaling properties
<meta name= "viewport" content= "Width=device-width, initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0" >
The problem of text enlargement after Safai horizontal screen
Metas[i].content= "width=device-width,minimum-scale=0.25,maximum-scale=1.6";
Third, iphone full-screen mode start
Full screen boot, hide toolbar, address bar, and bottom status bar
<meta name= "apple-mobile-web-app-capable" content= "yes" >
The purpose of this code is to display a status bar at the top of the browser
<meta name= "Apple-mobile-web-app-status-bar-style" content= "Black" >
Displays a loading interface when the program starts and loads, telling the user that the program is loading
〈link rel= "Apple-touch-starup-image" href= "Img/1/splash.png" >
Iv. prevent iOS in focus is auto-scaling
$ (' Input,select,textarea '). Bind (' focus blur ', function (event) {
$viewportMeta. attr ("Content", ' width=device-width,initial-scale=1,maximum-scale= ' + (event.type== ' blur '? 10:1) ");
})
V. Prohibition and restriction of partial webkit characteristics
A. Disable automatic conversion to dial-up links. Nocallout{-webkit-touch-callout:none;
b, modify the background color after the click *{-webkit-tap-highlight-color:rgba (0,0,0,0);}
C, let the interface element content editable P{-webkit-appearance:none}
D, add ellipsis function for narrow screen. Ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
Some tips for mobile development