meta标签在移动平台开发中的应用详解

2020-04-16 08:32:41易采站长站整理

2、Meta 之 format-detection

复制代码
<meta name=”format-detection” content=”telephone=no” />

你明明写的一串数字没加链接样式,而iPhone会自动把你这个文字加链接样式、并且点击这个数字还会自动拨号!想去掉这个拨号链接该如何操作呢?这时我们的meta又该大显神通了,代码如下:

telephone=no就禁止了把数字转化为拨号链接!
telephone=yes就开启了把数字转化为拨号链接,要开启转化功能,这个meta就不用写了,在默认是情况下就是开启!

3、Meta 之 apple-mobile-web-app-capable

复制代码
<meta name=”apple-mobile-web-app-capable” content=”yes” />

这meta的作用就是删除默认的苹果工具栏和菜单栏。content有两个值”yes”和”no”,当我们需要显示工具栏和菜单栏时,这个行meta就不用加了,默认就是显示。

4、Meta 之 apple-mobile-web-app-status-bar-style

复制代码
<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” />

作用是控制状态栏显示样式

复制代码
status-bar-style:black
status-bar-style:black-translucent