兼容Safari浏览器的专用代码,记录以下

来源:互联网 发布:nodejs还是python知乎 编辑:程序博客网 时间:2024/05/06 03:19

兼容Safari浏览器的专用代码,记录以下:

1)设置屏幕等比:

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">

2)设置safari兼容

<meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">

备注:apple-mobile-web-app-capable  设置是否全屏显示

           format-detection  设置是否自动将长数字类型设为点击可打电话

           apple-mobile-web-app-status-bar-style 设置指定的iphone中safari顶端的状态条的样式        

0 0