一些常用的meta标签及其作用
声明文档使用的字符编码
<meta charset='utf-8'>
优先使用 IE 最新版本和 Chrome
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="wap-font-scale" content="no">
页面描述
<meta name="description" content="不超过150个字符"/>
页面关键词
<meta name="keywords" content=""/>
网页作者
<meta name="author" content="name, email@gmail.com"/>
搜索引擎抓取
<meta name="robots" content="index,follow"/>
移动端
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<!-- viewport的content取值 -->
<!-- width:宽度(数值 / device-width)(200~10000,默认为980px) -->
<!-- height:高度(数值 / device-height)(223~10000) -->
<!-- initial-scale:初始缩放比例 (0~10) -->
<!-- minimum-scale:允许用户缩放到的最小比例 -->
<!-- maximum-scale:允许用户缩放到的最大比例 -->
<!-- user-scalable:是否允许用户缩放 (no/yes) -->
uc强制竖屏
<meta name="screen-orientation" content="portrait">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<!-- viewport的content取值 -->
<!-- width:宽度(数值 / device-width)(200~10000,默认为980px) -->
<!-- height:高度(数值 / device-height)(223~10000) -->
<!-- initial-scale:初始缩放比例 (0~10) -->
<!-- minimum-scale:允许用户缩放到的最小比例 -->
<!-- maximum-scale:允许用户缩放到的最大比例 -->
<!-- user-scalable:是否允许用户缩放 (no/yes) -->
uc强制竖屏
<meta name="screen-orientation" content="portrait">
QQ强制竖屏
<meta name="x5-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
UC强制全屏
<meta name="full-screen" content="yes">
<meta name="full-screen" content="yes">
QQ强制全屏
<meta name="x5-fullscreen" content="true">
<meta name="x5-fullscreen" content="true">
UC应用模式
<meta name="browsermode" content="application">
<meta name="browsermode" content="application">
QQ应用模式
<meta name="x5-page-mode" content="app">
<meta name="x5-page-mode" content="app">
IOS启用 WebApp 全屏模式
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
IOS全屏模式下隐藏状态栏/设置状态栏颜色 content的值为default | black | black-translucent
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
IOS添加到主屏后的标题
<meta name="apple-mobile-web-app-title" content="标题">
<meta name="apple-mobile-web-app-title" content="标题">
IOS添加智能 App 广告条 Smart App Banner
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
去除iphone 识别数字为号码
<meta name="format-detection" content="telephone=no">
不识别邮箱
<meta name="format-detection" content="email=no">
禁止跳转至地图
<meta name="format-detection" content="adress=no">
可以连写
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
去除iphone 识别数字为号码
<meta name="format-detection" content="telephone=no">
不识别邮箱
<meta name="format-detection" content="email=no">
禁止跳转至地图
<meta name="format-detection" content="adress=no">
可以连写
<meta name="format-detection" content="telephone=no,email=no,adress=no">