注:前言、目錄見 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"
}
}