如您所见here,此功能仍被标记为Beta。我想您需要使用最新版本的 Chrome 来测试此功能。
来自文章:
支持添加到主屏应用
Chrome 会在网页元素中查找以下元标记:
<meta name="mobile-web-app-capable" content="yes">
名称属性必须是“mobile-web-app-capable”,内容属性必须是“yes”(不区分大小写)。如果 content 属性中有任何其他值,则 Web 应用程序将被添加为常规书签。
图标
用于安装到主屏幕的图标是通过使用在以下<link> 标记之一中找到的最大图标来确定的:
<link rel="shortcut icon" sizes="192x192" href="nice-highres.png"> (recommended)
<link rel="shortcut icon" sizes="128x128" href="niceicon.png">
<link rel="apple-touch-icon" sizes="128x128" href="niceicon.png">
<link rel="apple-touch-icon-precomposed" sizes="128x128" href="niceicon.png">
注意:建议使用 192 像素的图片格式。最后两种格式 (apple-touch-*) 已弃用,仅在短时间内支持。
图标标签
应用程序的<title> 元素用作主屏幕上图标的默认标签。
配置
以下示例是支持主屏幕启动体验所需的最低配置。
<!doctype html>
<html>
<head>
<title>Awesome app</title>
<meta name="viewport" content="width=device-width">
<meta name="mobile-web-app-capable" content="yes">
<link rel="shortcut icon" sizes="192x192" href="/icon.png">
</head>
<body></body>
</html>
对比 iOS Safari 添加到主屏幕
如果 Web 应用程序使用“apple-mobile-web-app-capable”名称嵌入元标记,Chrome 还将允许它们以“应用程序模式”启动。 Chrome 将在即将发布的版本中停止支持这种用法。目前,当 Chrome 检测到只有“apple-mobile-web-app-capable”元标记的页面时,它会在开发者工具的控制台日志中显示弃用警告。警告显示如下:
虽然 Chrome 暂时接受 "apple-mobile-web-app-capable" 的使用,但 Chrome 不提供与 iOS Safari API 的兼容性,包括:
window.navigator.standalone
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-startup-image" href="/startup.png">
希望对你有帮助。