icons - Web app manifests 编辑
Type | Array |
---|---|
Mandatory | Yes |
The icons
member specifies an array of objects representing image files that can serve as application icons for different contexts. For example, they can be used to represent the web application amongst a list of other applications, or to integrate the web application with an OS's task switcher and/or system preferences.
Examples
"icons": [
{
"src": "icon/lowres.webp",
"sizes": "48x48",
"type": "image/webp"
},
{
"src": "icon/lowres",
"sizes": "48x48"
},
{
"src": "icon/hd_hi.ico",
"sizes": "72x72 96x96 128x128 256x256"
},
{
"src": "icon/hd_hi.svg",
"sizes": "72x72"
}
]
Values
Image objects may contain the following values:
Member | Description |
---|---|
sizes | A string containing space-separated image dimensions. |
src | The path to the image file. If src is a relative URL, the base URL will be the URL of the manifest. |
type | A hint as to the media type of the image. The purpose of this member is to allow a user agent to quickly ignore images with media types it does not support. |
purpose | Defines the purpose of the image, for example if the image is intended to serve some special purpose in the context of the host OS (i.e., for better integration).
|
Specifications
Specification | Status | Comment | Feedback |
---|---|---|---|
Web App Manifest | Working Draft | Initial definition. |
Browser compatibility
BCD tables only load in the browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论