H5页面 绝对定位元素被 软键盘弹出时顶起

软键盘弹出时顶起 底部按钮,tab

个人解决方案

取到屏幕高度 减 去  所需的按钮位置  决对定位到这个高度不会 弹起按钮

  <cube-tab-bar
    class="base-tabbar"
    v-model="selectedLabelDefault"
    :data="tabs"
    @click="clickHandler"
    :style="'top:'+tabbarTop+'px'"
  ></cube-tab-bar>
 
 this.tabbarTop =document.body.clientHeight - 50;
 
 
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}
.base-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  font-size: 12px;
  color: #636366;
  background: #fff;
  z-index: 1000;

猜你喜欢

转载自www.cnblogs.com/FACESCORE/p/12467328.html