微信小程序---app.json中设置背景色不生效解决办法

按照官方文档的说明,backgroundColor应该可以设置窗口的背景色。

"window":{
    "backgroundTextStyle":"light",
    "navigationBarBackgroundColor": "red",
    "navigationBarTitleText": "WeChat",
    "navigationBarTextStyle":"black",
    "backgroundColor": "#000",
    "enablePullDownRefresh":true
  },

但是设置backgroundColor后并不生效,解决办法就是直接在app.wxss中设置:

page{  
  background-color: black;
}  
posted @ 2018-01-06 15:10  Sarah119  Views(1790)  Comments(0Edit  收藏  举报