手機網站Meta標簽
手機端特有的Meta標簽
1、<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1">
網頁手機wap2.0網頁的head里加入下面這條元標簽,在iPhone的瀏覽器中頁面將以原始大小顯示,並不允許縮放。
說到移動平台meta標簽,那就不得不說一下viewport了,那么什么是viewport呢?
viewport即可視區域,對於桌面瀏覽器而言,viewport指的就是除去所有工具欄、狀態欄、滾動條等等之后用於看網頁的區域
2、<meta name="format-detection" content="telephone=no">
當該 HTML 頁面在手機上瀏覽時,該標簽用於指定是否將網頁內容中的手機號碼顯示為撥號的超鏈接。
在 iPhone 上默認值是:
<meta name="format-detection" content="telephone=yes"/>
如果你不希望手機自動將網頁中的電話號碼顯示為撥號的超鏈接,那么可以這樣寫:
<meta name="format-detection" content="telephone=no"/>
3、<meta name="apple-mobile-web-app-capable" content="yes" />
說明:網站開啟對web app程序的支持。
4、<meta name="apple-mobile-web-app-status-bar-style" content="black" />
說明:
在web app應用下狀態條(屏幕頂部條)的顏色;
默認值為default(白色),可以定為black(黑色)和black-translucent(灰色半透明)。
注意:若值為“black-translucent”將會占據頁面px位置,浮在頁面上方(會覆蓋頁面20px高度–iphone4和itouch4的Retina屏幕為40px)。
1、<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1">
網頁手機wap2.0網頁的head里加入下面這條元標簽,在iPhone的瀏覽器中頁面將以原始大小顯示,並不允許縮放。
說到移動平台meta標簽,那就不得不說一下viewport了,那么什么是viewport呢?
viewport即可視區域,對於桌面瀏覽器而言,viewport指的就是除去所有工具欄、狀態欄、滾動條等等之后用於看網頁的區域
2、<meta name="format-detection" content="telephone=no">
當該 HTML 頁面在手機上瀏覽時,該標簽用於指定是否將網頁內容中的手機號碼顯示為撥號的超鏈接。
在 iPhone 上默認值是:
<meta name="format-detection" content="telephone=yes"/>
如果你不希望手機自動將網頁中的電話號碼顯示為撥號的超鏈接,那么可以這樣寫:
<meta name="format-detection" content="telephone=no"/>
3、<meta name="apple-mobile-web-app-capable" content="yes" />
說明:網站開啟對web app程序的支持。
4、<meta name="apple-mobile-web-app-status-bar-style" content="black" />
說明:
在web app應用下狀態條(屏幕頂部條)的顏色;
默認值為default(白色),可以定為black(黑色)和black-translucent(灰色半透明)。
注意:若值為“black-translucent”將會占據頁面px位置,浮在頁面上方(會覆蓋頁面20px高度–iphone4和itouch4的Retina屏幕為40px)。