收藏
回答

如何让scroll-view占满父view的高度?

如上图,如何使灰色和蓝色的scroll-view和绿色的一样高度?

不能把 container这个view拿掉,谢谢!

wxml

<view class="container">
  <scroll-view scroll-y class="leftMenu" type="list">
  </scroll-view>
  <scroll-view class="rightContent" scroll-y type="list">
  </scroll-view>
</view>


wxss

page {
  height: 100vh;
}
.container {
  display: flex;
  flex-direction: row;
  height: 100%;
  background-color: #00ff00;
}

.leftMenu {
  width: 25%;
  height: 100%;
  background-color: #eeeeee;
}

.rightContent {
  width: 75%;
  height: 100%;
  background-color: #0000ff;
}


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

2 个回答

登录 后发表内容