CSS 属性 safe-area-inset-bottom 

safe-area-inset-bottom 就是安全区的高度

padding-bottom:env(safe-area-inset-bottom);

wx.getSystemInfoSync()

wx.getSystemInfoSync()可以获取系统信息

let system = wx.getSystemInfoSync()
let bottomSafe = system.screenHeight - system.safeArea.bottom

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐