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