gpt4 book ai didi

progressive-web-apps - 将背景图像添加到渐进式 Web 应用程序启动画面?

转载 作者:行者123 更新时间:2023-12-04 15:52:56 25 4
gpt4 key购买 nike

来自 MDN :

In Chrome 47 and later, a splash screen is displayed for a web application launched from a home screen. This splashscreen is auto-generated using properties in the web app manifest, specifically: name, background_color, and the icon in the icons array that is closest to 128dpi for the device.



我想知道是否可以使用全屏背景图像而不是生成的背景?

最佳答案

您可能需要查看有关 Adding a Splash Screen for Installed Web Apps in Chrome 47 的文档。 .

If you want to ensure that an icon will always be displayed consider that 48dp is the minimum image size we will display, which if you take the maximum density display currently supported (4x) then 48 * 4 = 192px. This is lucky because we need to 192px image for Add to Homescreen to work! Yay. Therefore, I would recommend always having 192px as the minimum sized icon and create 3 other versions at 256px, 384px and 512px. However, if you want to ensure that the user is not downloading too much data for the splash screen, especially on a low density device then you can go lower and Chrome will try to fetch the most appropriate image.



它表示当前支持的最大密度显示是 48dp 的 4 倍。

您可以提交 feature request为了这。

关于progressive-web-apps - 将背景图像添加到渐进式 Web 应用程序启动画面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42445253/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com