4. Add viewport for mobile devices
XML/HTML CodeCopy content to clipboard
- <meta name ="viewport" content ="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user- scalable=no">
- content parameter explanation:
- width viewport width (value/device-width)
- height viewport height (value/device-height)
- initial-scale Initial scaling ratio
- maximum-scale Maximum zoom ratio
- minimum-scale minimum zoom ratio
- user-scalable Whether to allow user scaling (yes/no)
- minimal-ui There is a new attribute in iOS 7.1 beta 2 that can minimize the upper and lower status bars when the page is loading. This is a Boolean value and can be written directly like this:
-
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui"> ;
-
5. iOS device
XML/HTML CodeCopy content to clipboard
- <meta name="apple-mobile-web -app-title" content="title"> added to Title after home screen (new in iOS 6)
-
<meta name="apple- mobile-web-app-capable" content="yes" / >Whether to enable WebApp full screen mode
-
<meta name="apple- mobile-web-app-status-bar-style" content="black-translucent" />Set the background color of the status bar
-
Only takes effect when "apple-mobile-web-app-capable" content="yes"
- content parameter:
- default default value.
- black The background of the status bar is black.
- black-translucent The background of the status bar is black and translucent.
- Set to default or black , the web page content starts from the bottom of the status bar.
- If set to black-translucent, the web content will fill the entire screen and the top will be blocked by the status bar.
-
6. iOS icon rel parameter
XML/HTML CodeCopy content to clipboard
- apple-touch-icon pictures are automatically processed into rounded corners and highlights.
- apple-touch-icon-precomposed prohibits the system from automatically adding effects and displays the original design directly.
-
<link rel="apple- touch-icon-precomposed" href="/apple-touch-icon-57x57-precomposed.png" />iPhone and iTouch, default 57x57 pixels, must have
-
<link rel="apple- touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-72x72-precomposed.png" />iPad, 72x72 pixels , you can not have it, but it is recommended to have it
-
<link rel="apple- touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png" />Retina iPhone and Retina iTouch, 114x114 pixels, optional but recommended
-
<link rel="apple- touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png" />Retina iPad, 144x144 Pixels are optional, but it is recommended that everyone use
-
<meta name="apple- mobile-web-app-title" content="title">It is best to limit the title to six Chinese characters in length. Extra long content will be hidden and added to the title after the home screen (new in iOS 6)
-
7. iOS startup screen
XML/HTML CodeCopy content to clipboard
- The iPad startup screen does not include the status bar area.
- iPad portrait screen 768 x 1004 (standard resolution)
-
<link rel="apple- touch-startup-image" sizes="768x1004" href="/splash-screen-768x1004.png" />iPad vertical screen 1536x2008 (Retina)
-
<link rel="apple- touch-startup-image" sizes="1536x2008" href="/splash-screen-1536x2008.png" />iPad landscape screen 1024x748 (standard resolution )
-
<link rel="apple- touch-startup-image" sizes="1024x748" href="/Default-Portrait-1024x748.png" />iPad landscape 2048x1496 (Retina)
-
<link rel="apple- touch-startup-image" sizes="2048x1496" href="/splash-screen-2048x1496.png" />
- The startup screen of iPhone and iPod touch includes the status bar area.
- iPhone/iPod Touch portrait screen 320x480 (standard resolution)
-
<link rel="apple- touch-startup-image" href="/splash-screen-320x480.png" />iPhone/iPod Touch Vertical Screen 640x960 (Retina)
-
<link rel="apple- touch-startup-image" sizes="640x960" href="/splash-screen-640x960.png" />iPhone 5/iPod Touch 5 vertical screen 640x1136 (Retina)
-
<link rel="apple- touch-startup-image" sizes="640x1136" href="/splash-screen-640x1136.png" />
-
<link rel="apple- touch-startup-image" href="Startup.png" / > When the user clicks on the home screen icon to open the WebApp, the system will display the startup screen. If it is not set, the system will display the home page screenshot of the website by default. Of course, this experience is not very good
-
XML/HTML CodeCopy content to clipboard
- <meta name="msapplication-TileColor" content="#000"/> Windows 8 Tile Color
-
<meta name="msapplication- TileImage" content="icon.png"/>Windows 8 Tile Icon
-
9. Uncommonly used
XML/HTML CodeCopy content to clipboard
- <link rel="alternate" type="application/rss xml" title="RSS" href="/rss.xml" />Add RSS Subscription
-
<link rel="shortcut icon " type="image/ico" href="/favicon.ico" />Add favicon icon
-
<meta name="format- detection" content="telephone=no" />Prohibit digit recognition from being automatically recognized as a phone number
-
<meta name="format- detection" content="email=no" />Don’t let android recognize email
-
<meta name="renderer" content="webkit">Enable the speed mode of 360 browser (webkit)
-
<meta http-equiv=" " >Avoid IE using compatibility mode
<meta name
=- "HandheldFriendly" content="true">Optimized for handheld devices, mainly For some old browsers that do not recognize viewport, such as BlackBerry
<meta name
=- "MobileOptimized" content="320">Microsoft’s old browser
<meta name
=- "x5- orientation" content="portrait">QQ forced vertical screen
-
<meta name="full- screen" content="yes">UC forced full screen
-
<meta name="x5- fullscreen" content="true">QQ forced full screen
-
<meta name="browsermode" content="application">UC application mode
-
<meta name="x5- page-mode" content="app">QQ application mode
-
<meta http-equiv=" Cache-Control" content="no-siteapp" /> Baidu transcoding is prohibited
-
<meta name="msapplication- tap-highlight" content="no">windows phone click No highlights
-
<meta name="keywords" content="" /> Key Words
-
<meta name="description" content="" /> Description
-
<meta name="title" content="" /> title
-
<meta name="author" content="-06" /> Author
-
<meta name="Copyright" content="" /> Company
-
<meta http-equiv=" " 🎜> Let IE browser use the most advanced kernel to render pages, and pages using Chrome framework use webkit kernel
<meta name
- ="apple- mobile-web-app-capable" content="yes"> IOS6 full screen
<meta name
- ="mobile- web-app-capable" content="yes"> Chrome High version full screen
<meta name
- ="renderer" content="webkit"> Let 360 dual-core browser use webkit kernel Rendering page
<meta name
- ="apple- itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL"> Add Smart App Banner Smart App Banner (iOS 6 Safari)
10. sns social tag
- XML/HTML CodeCopy content to clipboard
- <meta property="og:type" content="type" />
-
<meta property="og: url" content="URL address" />
-
<meta property="og: title" content="title" />
-
<meta property="og: image" content="image" />
-
<meta property="og: description" content="description" />
-
11. Conditional comments to determine IE browser
XML/HTML CodeCopy content to clipboard
The above is the entire content of this article, I hope it will be helpful to everyone’s study.