INTRO:经过大量Google搜索和一些矿石书籍后,我什么都没找到。我结束了这个问题的收集,以收集IOS上webapps / progresive web app的启动/启动屏幕/图像的任何逻辑解决方案。
我发现:
<link href="" sizes="2048x2732" rel="apple-touch-startup-image" media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)" >
<link href="" sizes="1668x2224" rel="apple-touch-startup-image" media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)" >
<link href="" sizes="1536x2048" rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)" >
<link href="" sizes="1125x2436" rel="apple-touch-startup-image" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)" >
<link href="" sizes="1242x2208" rel="apple-touch-startup-image" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)" >
<link href="" sizes="750x1334" rel="apple-touch-startup-image" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)" >
<link href=""sizes="640x1136" rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" >
此代码效果很好。 但... 为什么下面的代码不起作用?
<link rel="apple-touch-startup-image" sizes="2048x2732" href="">
<link rel="apple-touch-startup-image" sizes="768x1024" href="">
如果不添加media属性,则只有最后一行有效。这仅导致一个(屏幕尺寸) i-device会加载启动屏幕(苹果名称为)。
结论:我正在寻找创建启动屏幕的最佳方法。