html中的meta詳解
阿新 • • 發佈:2019-01-24
<!DOCTYPE html> <!-- HTML5 doctype 不區分大小寫 --> <html lang="zh"> <!-- 更加標準的 lang 屬性寫法 http://zhi.hu/XyIa --> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 優先使用IE最新版本和 Chrome --> <meta name="renderer"content="webkit|ie-comp|ie-stand"> <!-- 360 瀏覽器核心控制 --> <!-- content的取值為webkit,ie-comp,ie-stand之一,區分大小寫,分別代表用webkit核心,IE相容核心,IE標準核心。 若頁面需預設用極速核,增加標籤:<meta name="renderer" content="webkit"> 若頁面需預設用ie相容核心,增加標籤:<meta name="renderer" content="ie-comp"> 若頁面需預設用ie標準核心,增加標籤:<meta name="renderer" content="ie-stand">--> <!-- width=device-width 會導致 iPhone 5 新增到主屏後以 WebAPP 全屏模式開啟頁面時出現黑邊 http://bigc.at/ios-webapp-viewport-meta.orz --> <meta name ="viewport" content ="initial-scale=1.0, maximum-scale=3, minimum-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-title" content="標題"> <!--新增到主屏時的標題 --> <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- 是否啟用 WebAPP 全屏模式 --> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <!-- 狀態條顏色 --> <meta name="format-detection" content="telephone=no" /> <!-- 遮蔽數字自動識別為電話號碼 --> <!-- favicon 圖示 --> <link type="image/x-icon" rel="icon" href="http://static.example.com/favicon.ico"/> <link type="image/x-icon" rel="shortcut icon" href="http://static.example.com/favicon.ico"/> <link type="image/x-icon" rel="bookmark" href="http://static.example.com/favicon.ico"/> <!-- iOS 圖示 begin --> <!--預設 57x57 畫素--> <link rel="apple-touch-icon-precomposed" href="http://wanke.etao.com/assets/img/icon/57/apple-touch-icon-57x57-precomposed.png" /> <!--iPad 1 72x72 畫素--> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://wanke.etao.com/assets/img/icon/72/apple-touch-icon-72x72-precomposed.png" /> <!--iPhone 4 114x114 畫素--> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://wanke.etao.com/assets/img/icon/114/apple-touch-icon-114x114-precomposed.png" /> <!-- iOS 圖示 end --> <meta name="msapplication-TileColor" content="#000"/> <!-- Windows 8 磁貼顏色 --> <meta name="msapplication-TileImage" content="icon.png"/> <!-- Windows 8 磁貼圖示 --> <!-- SEO 優化 --> <meta name="description" content="" /> <!-- 頁面描述 --> <meta name="keywords" content=""/> <!-- 頁面關鍵詞 --> <title>頁面標題</title> <!-- iOS 應用啟動介面設定 begin --> <!-- iPad Landscape – 1024 x 748 --> <link rel="apple-touch-startup-image" sizes="1024x748" href="img/splash-screen-1024x748.png" /> <!-- iPad Portrait – 768 x 1004 --> <link rel="apple-touch-startup-image" sizes="768x1004" href="img/splash-screen-768x1004.png" /> <!-- iPhone/iPod Touch Portrait – 320 x 480 (standard resolution) --> <link rel="apple-touch-startup-image" href="img/splash-screen-320x480.png" /> <!-- iPhone/iPod Touch Portrait – 640 x 960 pixels (high-resolution) --> <link rel="apple-touch-startup-image" sizes="640x960" href="img/splash-screen-640x960.png" /> <!-- iOS 應用啟動介面設定 end --> </head>