mui.plusReady(function() {
var topoffset = '45px';
var header = document.getElementById('heardermylab'); //在head处加上id='heardermylab'
console.log(plus.navigator.isImmersedStatusbar())
if(plus.navigator.isImmersedStatusbar()) { // 兼容immersed状态栏模式
// 获取状态栏高度并根据业务需求处理,这里重新计算了子窗口的偏移位置
topoffset = (Math.round(plus.navigator.getStatusbarHeight()) + 45);
header.style.height = topoffset + 'px';
header.style.paddingTop = (topoffset - 45) + 'px';
}
});

相关文章:

  • 2022-12-23
  • 2021-09-19
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2021-09-26
  • 2021-08-22
  • 2022-12-23
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
相关资源
相似解决方案