前端开发~uni-app ·[项目-仿糗事百科] 学习笔记 ·005【设置全局属性globalStyle】

注:前言、目录见 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"
	}
}
发布了49 篇原创文章 · 获赞 9 · 访问量 3121

猜你喜欢

转载自blog.csdn.net/qq_44220418/article/details/105313237