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

注:前言、目录见 https://god-excious.blog.csdn.net/article/details/105312456

文章目录

  • 【012】设置全局样式globestyle

【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"
	}
}

你可能感兴趣的:(前端开发)