收藏
回答

为什么scroll-view组件设置固定高度在ios下会失效且多出一倍的高度?

<scroll-view class="page" enhanced scroll-y upper-threshold="300" bindscroll="bindscroll" refresher-enabled refresher-triggered="{{refresherFlag}}" bindrefresherrefresh="bindrefresherrefresh" style="height:{{windowHeight - TabbarHeight}}px;"></scroll-view>

windowHeight 这个是动态获取设备的高度,TabbarHeight这个为自定义tabbar的高度,下面是css
.page {
  overflow: hidden;
  position: fixed;
  left0;
  right0;
  top0;
  bottom0;
  z-index2;
  flex1;
  /* background-color: deeppink; */
}



只在预览模式和正式版小程序里面出现这个问题,真机调试没有出现这个问题

回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容