当前位置:网站首页>记自定义微信小程序顶部导航栏
记自定义微信小程序顶部导航栏
2022-06-29 08:26:00 【swag_特约男演员】
有需求就要有解决方法
如何让自定义导航栏兼容所有机型,一定要拿到statusBarHeight(顶部的状态高度),
怎么拿?
状态栏的高度:
在它的下面才能写我们自定义的导航栏,这样所有机型都适用,不会被挡住。
注意
- 在哪个页面自定义顶部导航栏,就要对应的自己再写一个,小胶囊会保留,返回按钮要自己加即
wx.navigateBack({delta: 1})就行 - 最好用固定布局
fixed不然有可能导航栏会随着页面进行滚动,这样不彳亍 - 用了自定义导航栏的页面,其返回的可用高度
windowHeight是不包含状态栏高度的statusBarHeight一些地方是需要计算页面高度的
使用

效果
圈的这部分就是导航栏
还可以用图片,想要多高就给他多高
边栏推荐
- Network learning of pointnet
- 微信小程序搜索关键字高亮和ctrl+f搜索定位实现
- io流的总结
- Verilog 拼接操作符号
- TypeScript 變量聲明 —— 類型斷言
- 2022 spring summer collection koreano essential reshapes the vitality of fashion
- Verilog shift operator
- Is the securities account of qiniu school really safe and reliable?
- 2022年7月(软考高级)信息系统项目管理师认证招生简章
- 微信小程序自定义多项选择器
猜你喜欢
随机推荐
工厂模式
闭关修炼(二十)如何做好单元测试
积分商城运营要如何做才能获取到利润
La finale de la zone de compétition Hefei de la sixième saison 2022 a été couronnée de succès.
Unity C # e-learning (12) -- protobuf generation protocol
微信小程序搜索关键字高亮和ctrl+f搜索定位实现
verilog 归约操作符
P4769-[noi2018] bubble sort [combinatorics, tree array]
Differences between x86 and x64
今天让你知道PMP考试通过率达97%,可信不可信
闭关修炼(二十二)session和cookie原理
单例模式的理解
2022年7月系统集成项目管理工程师认证招生简章
DevOps到底是什么意思?
Calculus Learning
Uniapp wechat applet reports an error typeerror: cannot read property 'call' of undefined
今年的网络安全“体检”你做了吗?
15 things to learn in a year of internship in famous enterprises, so you can avoid detours.
Mysql使用union all统计多张表组合总数,并分别统计各表数量
New paid Tarot calculation source code (with building tutorial)









