滚动条

滚动条

<el-scrollbar wrap-class="scrollbar-wrap">
 <div class="has-content-list">
   <div v-for="(item, index) in geographyData" :key="index" class="has-content-list-item">
     <div class="has-content-list-item__index">{{ Number(index) + 1 }}</div>
     <div class="has-content-list-item__word">{{item}}</div>
   </div>
 </div>
</el-scrollbar>
 .el-scrollbar {
    height: calc(100% - 32px);
  }
  // 必须加高度
  .scrollbar-wrap {
    height: 100%;
    overflow-x: hidden;
  }
上一篇:滚动条优化


下一篇:前端编程黑科技,一些小技巧(二)