iOS WebApp未显示启动图像



我添加了

<link rel="apple-touch-icon" href="favicon.png" />
<link rel="apple-touch-startup-image" href="splash-screen.png"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black">

在我网站的头标签之间但它不适用于启动映像这正常吗?

您是否试图在桌面浏览器中查看启动图像?如果是这样的话,我会在IOS移动设备上访问你的网站,并将该应用程序添加到你的主屏幕上。当你打开它时,你应该会看到启动屏幕。

对于不同的屏幕尺寸,飞溅屏幕也很棘手。您可以使用以下代码来确保它正常工作。

        <!-- IOS Touch Icons -->
        <link href="apple-touch-icon-57x57.png" sizes="57x57" rel="apple-touch-icon">
        <link href="apple-touch-icon-72x72.png" sizes="72x72" rel="apple-touch-icon">
        <link href="apple-touch-icon-114x114.png" sizes="114x114" rel="apple-touch-icon">
        <link href="apple-touch-icon-144x144.png" sizes="144x144" rel="apple-touch-icon">
        <!-- iOS Startup images -->
        <link href="apple-touch-startup-image-320x460.png" media="(device-width: 320px)" rel="apple-touch-startup-image">
        <link href="apple-touch-startup-image-640x920.png" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
        <link href="apple-touch-startup-image-768x1004.png" media="(device-width: 768px) and (orientation: portrait)" rel="apple-touch-startup-image">
        <link href="apple-touch-startup-image-748x1024.png" media="(device-width: 768px) and (orientation: landscape)" rel="apple-touch-startup-image">
        <link href="apple-touch-startup-image-1536x2008.png" media="(device-width: 1536px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
        <link href="apple-touch-startup-image-2048x1496.png" media="(device-width: 1536px)  and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">

生成所有这些图像是非常乏味的,所以我会使用一个工具自动生成不同的图标和启动屏幕图像。

一个这样的工具是http://ticons.fokkezb.nl/

自iOS 9以来,此功能似乎已被破坏。

虽然还没有任何官方消息,但这条帖子(以及苹果公司没有回应)表明这可能是一个bug。

官方文档(上次更新于2016年12月)仍然列出了苹果触摸启动镜像功能,因此希望它最终会得到修复。

最新更新