V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
sugarkeek
V2EX  ›  JavaScript

求问,小程序的菜单栏怎么和右边的功能键垂直居中?

  •  
  •   sugarkeek · 19 天前 · 849 次点击
    我目前只知道系统的状态栏的高度

    3 条回复    2025-03-11 14:33:03 +08:00
    gloye
        1
    gloye  
       19 天前   ❤️ 1
    小程序有个 api 是获取右边胶囊位的位置 wx.getMenuButtonBoundingClientRect
    https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.getMenuButtonBoundingClientRect.html
    moonbeama
        2
    moonbeama  
       19 天前


    尝试一下
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3344 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 05:00 · PVG 13:00 · LAX 22:00 · JFK 01:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.