注:前言、目录见 https://god-excious.blog.csdn.net/article/details/105312456
【012】设置全局样式globestyle
官方文档https://uniapp.dcloud.io/collocation/pages?id=globalstyle
具体在pages.json文件中的globalStyle里设置
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/demo/demo",
"style" : {}
}
,{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "仿糗事百科"
}
}
,{
"path" : "pages/ceshi/ceshi",
"style" : {}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "仿糗事百科",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
}