A weird question.

clipboard.png

60px,calc(100% - 60px)676px644pxjs676px,better-scroll644px

clipboard.png

<div class="list">
    <header ref="header">
      better-scroll
    </header>
    <div ref="wrapper" class="wrapper">
      <div>
        <div v-for="(item, index) in list1" :key="index">item{{index}}</div>
      </div>
    </div>
  </div>
mounted () {
    this.scroll = new BScroll(this.$refs.wrapper)
}
header{
  font-size: 20px;
  text-align: center;
  height: 60px;
  line-height: 60px;
  position: relative;
  z-index: 1;
  background: -sharpFFF;
}
.list {
  height: 100%;
}
.wrapper {
  background: red;
  height: calc(100% - 60px);
}
Mar.28,2021

because your < div vcopyright for = "(item, index) in list1": key= "index" > item {{index}} < / div > child element pushes the parent higher.


child element holds the parent element apart, setting max-height and overflow

Menu