简体   繁体   English

PWA 清单中的 SVG 图标。json - 如何为所有尺寸设置它?

[英]SVG icon in PWA manifest.json - how to set it for all sizes?

Is there any way now to specify that an SVG icon in "manifest.json" for a PWA should be used for all possible sizes?现在有什么方法可以指定 PWA 的“manifest.json”中的 SVG 图标应用于所有可能的尺寸? (Chrome/chromium is my main target now. Firefox will hopefully follow.) (Chrome/chromium 现在是我的主要目标。希望 Firefox 会跟进。)

    "icons": [
        {
            "src": "path-to-icon.svg",
            "purpose": "maskable any",
            "sizes: "???"
        }
    ],

Is there any way now to specify that an SVG icon in "manifest.json" for a PWA should be used for all possible sizes?现在有什么方法可以指定 PWA 的“manifest.json”中的 SVG 图标应该用于所有可能的大小? (Chrome/chromium is my main target now. Firefox will hopefully follow.) (铬/铬现在是我的主要目标。Firefox 有望跟进。)

    "icons": [
        {
            "src": "path-to-icon.svg",
            "purpose": "maskable any",
            "sizes: "???"
        }
    ],

"sizes": "any" didn't work for me. “尺寸”:“任何”对我不起作用。 I used the following configuration:我使用了以下配置:

{
    "src": "logo.svg",
    "sizes": "48x48 72x72 96x96 128x128 256x256 512x512",
    "type": "image/svg+xml",
    "purpose": "any"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM