- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
- width -裝置區域大小。
- initial-scale - 初始的縮放比例
- minimum-scale - 允許使用者縮放到的最小比例
- maximum-scale - 允許使用者縮放到的最大比例
- user-scalable - 使用者是否可以手動縮放
-
<meta name=”format-detection” content=”telephone=no” />
你明明寫的一串數字沒加連結樣式,而iPhone會自動把你這個文字加連結樣式、并且點選這個數字還會自動撥号!想去掉這個撥号連結該如何操作呢?這時我們的meta又該大顯神通了,代碼如下:
telephone=no就禁止了把數字轉化為撥号連結!
telephone=yes就開啟了把數字轉化為撥号連結,要開啟轉化功能,這個meta就不用寫了,在預設是情況下就是開啟!
-
<meta name=”apple-mobile-web-app-capable” content=”yes” />
這meta的作用就是删除預設的蘋果工具欄和菜單欄。content有兩個值”yes”和”no”,當我們需要顯示工具欄和菜單欄時,這個行meta就不用加了,預設就是顯示。
-
<meta name=”apple-mobile-web-app-status-bar-style” content=”default” />
<meta name=”apple-mobile-web-app-status-bar-style” content=”black” />
<meta name=”apple-mobile-web-app-status-bar-style” content=”black-translucent” />
作用是控制狀态欄顯示樣式