当前位置:网站首页>微信小程序,自定义输入框与导航胶囊对其
微信小程序,自定义输入框与导航胶囊对其
2022-08-10 14:15:00 【_Lan】

介绍:
获取导航胶囊的信息,有两个事件,wx.getSystemInfoSync()与wx.getMenuButtonBoundingClientRect()(注意这里不能使用rpx,只能使用px)。
状态栏高度:wx.getSystemInfoSync(),使用statusBarHeight。
胶囊高度:wx.getMenuButtonBoundingClientRect(),使用返回的height。
导航栏高度计算:(胶囊top-状态栏高度)*2 + 胶囊高度。


边栏推荐
- ICML 2022 | 基于随机注意力机制的可解释可泛化图学习
- 司空见惯 - 股市狠狠下跌后,何時能反弹?
- C#实现访问OPC UA服务器
- Summary of tensorflow installation stepping on the pit
- tampercfg内核模块导致机器频繁crash
- 文件系统设计
- 第五讲 测试技术与用例设计
- How is the monthly salary table stored in the database?Ask for a design idea
- 《论文阅读》PLATO: Pre-trained Dialogue Generation Model with Discrete Latent Variable
- How to code like a pro in 2022 and avoid If-Else
猜你喜欢
随机推荐
“Oracle 封禁了我的账户”
C#实现访问OPC UA服务器
关于已拦截跨源请求CORS 头缺少 ‘Access-Control-Allow-Origin‘问题解决
2012年下半年 系统架构设计师 下午试卷 II
PCL 最小二乘拟合空间曲线
In the second half of 2012 system architecture designers afternoon paper II
OpenStack-related commands that need to be recorded _ self-use
镜像瘦身:每一层都不能放过
【有限元分析】异型密封圈计算泄漏量与参数化优化过程(带分析源文件)
d为何用模板参数
锂电池技术
【POI 2008, BLO】Cut Point
发送post请求前台无法获取数据
WebView的优化与常见问题解决方案
Makefile missing separator. Stop.怎么解决「建议收藏」
系统的安全和应用(不会点安全的东西你怎么睡得着?)
《论文阅读》PLATO: Pre-trained Dialogue Generation Model with Discrete Latent Variable
CodeForces - 811A
Classifying irises using decision trees
usb转rs485测试软件,usb转rs485「建议收藏」







