微信小程序/uni——自定义导航栏

uni-app自定义导航栏在pages.json文件里面的配置

默认效果:

在这里插入图片描述

取消小程序顶部栏自定样式

在这里插入图片描述
代码:

{
    
    
	"path": "pages/index/index",
	"style": {
    
    
		"navigationStyle": "custom",
	}
}

状态栏高度

在这里插入图片描述
在这里插入图片描述

padding-top: var(--status-bar-height);

参考网址:
https://uniapp.dcloud.net.cn/collocation/pages.html#customnav

猜你喜欢

转载自blog.csdn.net/xulihua_75/article/details/126871937