元素可提供有關頁面的相關元信息小結篇

<!--移動端-->
<!--viewport:能優化移動瀏覽器的顯示。如果不是響應式網站,不要使用initial-scale或者禁用縮放
    width:寬度(數值 / device-width)(範圍從200 到10,000,默認爲980 像素)
    height:高度(數值 / device-height)(範圍從223 到10,000)
    initial-scale:初始的縮放比例 (範圍從>0 到10)
    minimum-scale:允許用戶縮放到的最小比例
    maximum-scale:允許用戶縮放到的最大比例
    user-scalable:用戶是否可以手動縮 (no,yes) -->
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,user-scalable=no">
<!--忽略數字自動識別爲電話號碼
    忽略識別郵箱-->
<meta name="format-detection" content="telephone=no"/>
<meta content="email=no" name="format-detection"/>
<!--僞裝app,離線應用-->
<meta name="apple-mobile-web-app-capable" content="yes"><!-- 啓用 WebApp 全屏模式 -->
<!--隱藏狀態欄/設置狀態欄顏色:只有在開啓WebApp全屏模式時才生效。
    content的值爲default | black | black-translucent 。-->
<meta name=”apple-mobile-web-app-status-bar-style” content=”black”/>
<!--添加到主屏後的標題-->
<meta name="apple-mobile-web-app-title" content="標題">
<!--添加智能 App 廣告條 Smart App Banner:告訴瀏覽器這個網站對應的app,並在頁面上顯示下載banner(如下圖)。參考文檔-->
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
<!-- 針對手持設備優化,主要是針對一些老的不識別viewport的瀏覽器,比如黑莓 -->
<meta name="HandheldFriendly" content="true">
<!-- 微軟的老式瀏覽器 -->
<meta name="MobileOptimized" content="320">

<!--HTML5頁面強制豎屏和全屏,部分瀏覽器兼容-->
<!-- uc強制豎屏 -->
<meta name="screen-orientation" content="portrait">
<!-- QQ強制豎屏 -->
<meta name="x5-orientation" content="portrait">
<!-- UC強制全屏 -->
<meta name="full-screen" content="yes">
<!-- QQ強制全屏 -->
<meta name="x5-fullscreen" content="true">
<!-- UC應用模式 -->
<meta name="browsermode" content="application">
<!-- QQ應用模式 -->
<meta name="x5-page-mode" content="app">
<!-- windows phone 點擊無高光 -->
<meta name="msapplication-tap-highlight" content="no">
<!--"添加到主屏幕“後,全屏顯示-->
<meta name="apple-touch-fullscreen" content="yes">
<!--向服務器發送了名稱/值對:content-type: text/html,
    這將告訴瀏覽器準備接受一個HTML文檔。charset = utf-8 指的是編碼方式爲utf-8編碼-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--頁面定期刷新,如果加url的,則會重新定向到指定的網頁,content後面跟的是時間(單位秒)
    新聞頁面,論壇等,不過一般不會用這個,都用新的技術比如ajax等
    這裏0表示沒有延時,直接跳轉到後面的URL;把0改成1,則延時1秒後跳轉-->
<meta http-equiv="refresh" content="0;url=" />


<!--SEO優化-->
<meta name="keywords" content=""/>
<meta name="msapplication-tap-highlight" content="no">
<meta name="description" content=""/>
<meta name="robots" content="index,follow" />
<meta name="author" content="author name" /> <!-- 定義網頁作者 -->
<meta name="google" content="index,follow" />
<meta name="googlebot" content="index,follow" />
<meta name="verify" content="index,follow" />


<!--網頁相關-->
<!--申明編碼-->
<meta charset='utf-8' />
<!--優先使用 IE 最新版本和 Chrome-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!-- 關於X-UA-Compatible -->
<meta http-equiv="X-UA-Compatible" content="IE=6" ><!-- 使用IE6 -->
<meta http-equiv="X-UA-Compatible" content="IE=7" ><!-- 使用IE7 -->
<meta http-equiv="X-UA-Compatible" content="IE=8" ><!-- 使用IE8 -->
<!--轉碼申明:用百度打開網頁可能會對其進行轉碼(比如貼廣告),避免轉碼可添加如下meta-->
<meta http-equiv="Cache-Control" content="no-siteapp" />
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章