EOS Pia Splash Screen?

问题描述 投票:0回答:2

在PWA启动画面方面,人们会想到https://pwa-splash.now.sh/https://medium.com/@applification/progressive-web-app-splash-screens-80340b45d210的代码

这是最新的和设备兼容的方式吗?或者让人们发现问题并进行修改?

这是代码:

<link rel="apple-touch-startup-image" href="images/splash/launch-640x1136.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="images/splash/launch-750x1294.png" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="images/splash/launch-1242x2148.png" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="images/splash/launch-1125x2436.png" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="images/splash/launch-1536x2048.png" media="(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="images/splash/launch-1668x2224.png" media="(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="images/splash/launch-2048x2732.png" media="(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">

更新1:

回答下面Robinyo的回答,采取上面的第一个例子:

<link rel="apple-touch-startup-image" href="images/splash/launch-640x1136.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">

是否需要为景观添加以下行?

<link rel="apple-touch-startup-image" href="images/splash/launch-**1136x640**.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: **landscape**)">

也许我错了,但我真的不确定iOS PWA是否会处理它。原因是因为我在创建时读到(添加到主屏幕),iOS选择一个png并将其存储在本地。因此,下次打开PWA应用程序时,它会在尝试连接到Web之前使用该一个本地映像。所以我想知道的问题是iOS是否会在本地存储两个图像,一个用于纵向,一个用于横向。

ios splash-screen progressive-web-apps
2个回答
1
投票

看看:PWA Tips and Tricks

肖像:

enter image description here

景观:

enter image description here


0
投票

截至2019年4月30日,https://gist.github.com/EvanBacon/7fd4dc3be3d00096579bb0b134c56ec7工作(在iPad Pro 11英寸,iPhone XS Max测试),包括肖像和风景。

© www.soinside.com 2019 - 2024. All rights reserved.