background_color

wobuhuisuanmin

Type
String
Mandatory No

被装载其样式表之前的 background_color 构件限定了用于应用页的占位符的背景颜色来显示。此值用于由用户代理来绘制一个快捷方式的背景颜色,当样式表加载之前清单是可用的。

(原文:The background_color member defines a placeholder background color for the application page to display before its stylesheet is loaded. This value is used by the user agent to draw the background color of a shortcut when the manifest is available before the stylesheet has loaded.)

因此,background_color 应于 background-color网站样式表中的CSS属性匹配,以在启动Web应用程序和加载网站内容之间进行平滑过渡。

(原文:Therefore background_color should match the background-color CSS property in the site’s stylesheet for a smooth transition between launching the web application and loading the site's content.)

注意:该 background_color 构件仅用于在从网络或存储介质加载主样式表时改善用户体验。background-color 当渐进式Web应用程序样式表可用时,用户代理不会将其用作CSS属性。

实例

"background_color": "red"

规范

规范 状态 注释 反馈

Web App Manifest
background_color

Working Draft

初始定义

Web App Manifest Working Group drafts

浏览器兼容性

BCD tables only load in the browser