生活随笔
收集整理的這篇文章主要介紹了
meta标签设置
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
meta 標(biāo)簽常用設(shè)置
<!-- 根據(jù)瀏覽器的屏幕大小自適應(yīng)的展現(xiàn)合適的效果 -->
<meta name=
"applicable-device" content=
"pc,mobile" /><!-- 移動端 瀏覽器中頁面將以原始大小顯示,不允許縮放 -->
<meta name=
"viewport" content=
"width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /><!-- 優(yōu)先使用 IE 最新版本和 Chrome -->
<meta http-equiv=
"X-UA-Compatible" content=
"IE=edge,chrome=1" />
//它必須顯示在網(wǎng)頁中除 title 元素和其他 meta 元素以外的所有其他元素之前。如果不是的話,它不起作用<!-- iphone會把一串?dāng)?shù)字識別為電話號碼,點(diǎn)擊的時候會提示是否呼叫,屏蔽這功能則把telephone設(shè)置為no -->
<meta content=
"telephone=no" name=
"format-detection" /><!-- iphone的私有標(biāo)簽,默認(rèn)值為default(白色),可以定為black(黑色)和black-translucent(灰色半透明) -->
<meta content=
"black" name=
"apple-mobile-web-app-status-bar-style"><!-- iphone設(shè)備的是有標(biāo)簽 允許全屏模式瀏覽,隱藏瀏覽器導(dǎo)航欄 -->
<meta content=
"yes" name=
"apple-mobile-web-app-capable" /><!-- 全屏顯示 -->
<meta content=
"yes" name=
"apple-touch-fullscreen" /><!-- UC強(qiáng)制全屏 -->
<meta name=
"full-screen" content=
"yes"><!-- QQ強(qiáng)制全屏 -->
<meta name=
"x5-fullscreen" content=
"true"><!-- 屏蔽百度轉(zhuǎn)碼 -->
<meta http-equiv=
"Cache-Control" content=
"no-transform" />
<meta http-equiv=
"Cache-Control" content=
"no-siteapp" /><!-- 定義網(wǎng)頁簡短描述 -->
<meta name=
"description" content=
"Cochemist"><!-- 定義網(wǎng)頁關(guān)鍵詞 -->
<meta name=
"keywords" content=
"生物化學(xué)"> <!-- 定義網(wǎng)頁的作者 -->
<meta name=
"author" content=
"sun_Annie"><!-- 避免HTML頁面緩存 -->
<meta http-equiv=
"pragma" content=
"no-cache" />
<meta http-equiv=
"cache-control" content=
"no-cache">
<meta http-equiv=
"expires" content=
"0"><!-- 定義網(wǎng)頁的緩存過期時間 -->
<meta http-equiv=
"expires" content=
"Sunday 26 October 2016 00:00 GMT">
//由于這是一個過去的日期,所以這個網(wǎng)頁只要一打開,就會直接到網(wǎng)站服務(wù)器重新下載頁面內(nèi)容,而不是從cache調(diào)用。這是一種防止網(wǎng)頁被cache緩存的措施。
復(fù)制代碼
總結(jié)
以上是生活随笔為你收集整理的meta标签设置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。