📒
notebook
  • Notebook
  • DevOps
    • Git
      • 常见 Git 操作
      • 使用 SSH 连接 Git 远程仓库
      • 使用 GPG Keys 签名 Git 提交
      • Git on macOS
    • Docker
      • macOS 安装配置 Docker
      • CentOS7 安装配置 Docker CE
  • Linux
    • CentOS
      • CentOS7 安装配置 vsftpd
      • CentOS7 设置虚拟内存
      • CentOS7 使用 acme.sh 自动申请免费 SSL 证书
      • CentOS7 修改 SSH 端口号
      • CentOS7 主机初始设置
      • 阿里云 CentOS 主机常见设置
      • CentOS7 安装配置 SS
    • nginx
      • nginx 配置 301 永久重定向
      • nginx 使用 SSL证书配置 HTTPS
      • CentOS7 安装配置 nginx
      • nginx 配置 gzip 压缩
      • nginx 代理静态网页
  • Server
    • Ghost
      • macOS 安装配置 Ghost
      • CentOS7 安装配置 Ghost
    • npm & Yarn
      • Yarn 常用命令
      • CentOS7 安装卸载升级 Yarn
      • npm & Yarn 常见错误处理
      • macOS 安装卸载升级 Yarn
    • Node.js
      • Awesome Node.js
      • CentOS7 安装卸载升级 Node.js
      • macOS 安装卸载升级 Node.js
  • Web
    • Ionic
      • 创建 Ionic & Angular 项目
      • 使用 Ionic & Cordova 构建 Android 应用
      • macOS 搭建 Ionic & Cordova 开发环境
    • CSS
      • CSS 排版技巧
      • Awesome CSS
      • CSS 三栏自适应布局
    • Angular
      • Awesome Angular
      • 创建 Angular 项目
    • HTML
      • HTML head 常用标签
      • HTML 常用 DTD 声明
      • 常用网页语义结构
    • Web 技术标准
    • JavaScript
      • Awesome JavaScript
      • JavaScript 的 eval() 函数详解
  • Mobile
    • H5
      • iOS Safari Web App 配置
  • Development Environment
    • Development Utilities
      • Awesome Windows
      • macOS 安装配置 Homebrew
      • Awesome macOS
      • macOS 安装配置 iTerm2
    • FEED
      • 常用 Gulp 插件
  • Network
    • 常见公共 DNS
  • Technology Stacks for Web Front-End Development
Powered by GitBook
On this page
  • 全屏模式
  • 状态栏
  • Web Clips
  • 链接应用
  • 参考文献

Was this helpful?

  1. Mobile
  2. H5

iOS Safari Web App 配置

全屏模式

手动开启页面全屏模式:

<!-- 开启全屏模式 -->
<meta name="apple-mobile-web-app-capable" content="yes">

Tips: 可使用 JS 的 window.navigator.standalone 属性来查看是否开启了全屏模式。

状态栏

全屏模式下可设置状态栏样式:

<!-- 默认状态栏 -->
<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">

Web Clips

Web Clips 图标配置(必须 PNG 格式):

<!-- iPhone: 120px & 180px -->
<link rel="apple-touch-icon" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon-180x180.png">

<!-- iPad Pro: 167px -->
<link rel="apple-touch-icon" sizes="167x167" href="apple-touch-icon-167x167.png">

<!-- iPad, iPad mini: 152px -->
<link rel="apple-touch-icon" sizes="152x152" href="apple-touch-icon-152x152.png">

Web Clips 图标下方标题配置:

<!-- 默认使用 title 内容 -->
<title>App Name</title>

<!-- 手动指定不同内容 -->
<meta name="apple-mobile-web-app-title" content="App Name">

链接应用

使用链接调用系统应用:

<!-- Email -->
<a href="mailto:user@example.com">Email</a>

<!-- Phone call -->
<a href="tel:1-408-555-5555">Phone Call</a>

<!-- SMS -->
<a href="sms:">Launch Messages App</a>
<a href="sms:1-408-555-1212">New SMS Message</a>

<!-- FaceTime video calls -->
<a href="facetime:14085551234">FaceTime Video Call</a>
<a href="facetime:user@example.com">FaceTime Video Call</a>

<!-- FaceTime audio calls -->
<a href="facetime-audio:14085551234">FaceTime Audio Call</a>
<a href="facetime-audio:user@example.com">FaceTime Audio Call</a>

Tips:

iOS Safari 会自动识别电话号码和邮件地址字符并添加链接,可手动关闭:

<!-- 忽略数字自动识别为电话号码 -->
<meta name="format-detection" content="telephone=no">

<!-- 忽略邮件地址识别 -->
<meta name="format-detection" content="email=no">

参考文献

PreviousH5NextDevelopment Environment

Last updated 5 years ago

Was this helpful?

Supported Meta Tags
Configuring Web Applications
App Icon
About Apple URL Schemes