移动开发
WebApp 的 meta 标签
apple-mobile-web-app-capable
设置Web应用是否以全屏模式运行。
- 语法:
- <meta name="apple-mobile-web-app-capable" content="yes">
- 说明:
- 如果content设置为yes,Web应用会以全屏模式运行,反之,则不会。content的默认值是no,表示正常显示。你可以通过只读属性window.navigator.standalone来确定网页是否以全屏模式显示。
- 兼容性:
- iOS 2.1 +
apple-mobile-web-app-status-bar-style
设置Web App的状态栏(屏幕顶部栏)的样式
- 语法:
- <meta name="apple-mobile-web-app-status-bar-style" content="blank">
- 说明:
-
除非你先使用apple-mobile-web-app-capable指定全屏模式,否则这个meta标签不会起任何作用。
如果content设置为default,则状态栏正常显示。如果设置为blank,则状态栏会有一个黑色的背景。如果设置为blank-translucent,则状态栏显示为黑色半透明。如果设置为default或blank,则页面显示在状态栏的下方,即状态栏占据上方部分,页面占据下方部分,二者没有遮挡对方或被遮挡。如果设置为blank-translucent,则页面会充满屏幕,其中页面顶部会被状态栏遮盖住(会覆盖页面20px高度,而iphone4和itouch4的Retina屏幕为40px)。默认值是default。
- 兼容性
- iOS 2.1 +
format-detection
启动或禁用自动识别页面中的电话号码。
- 语法:
- <meta name="format-detection" content="telephone=no">
- 说明:
- 默认情况下,设备会自动识别任何可能是电话号码的字符串。设置telephone=no可以禁用这项功能。
- 兼容性
- iOS 1.0 +
浙公网安备 33010602011771号