在我的manifest.json文件中,我设置了主题颜色和背景颜色
{
"name": "Friends",
"short_name": "Friends",
"icons": [
{
"src": "/src/images/icons/friends-b-icon-48x48.png",
"type": "image/png",
"sizes": "48x48"
},
{
"src": "/src/images/icons/friends-b-icon-144x144.png",
"type": "image/png",
"sizes": "144x144"
},
{
"src": "/src/images/icons/friends-b-icon-256x256.png",
"type": "image/png",
"sizes": "256x256"
},
{
"src": "/src/images/icons/friends-b-icon-512x512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": "/index.html",
"scope": ".",
"display": "standalone",
"orientation": "portrait-primary",
"background-color": "#795548",
"theme-color": "#795548",
"description": "Share your moments with your friends",
"dir": "ltr",
"lang": "en-US"
}
有谁知道如何解决这个问题? 提前谢谢!
答案 0 :(得分:2)
在manifest.json
中,属性的名称使用_
作为分隔符,而不是-
。
您必须将background-color
更改为background_color
,将theme-color
更改为theme_color
。