<ul class="carimg-nav"> <li>手续证件</li> <li class="ca-more"> 查看更多 <van-icon name="arrow" /> </li> </ul> <ul ref="imgList" class="carI-list"> <li v-for="(item,index) in imgList" :key="index"> <img :src="item" alt /> </li> </ul> _loopImg() { let tabsWidth = 164; let width = this.imgList.length * tabsWidth; this.$refs.imgList.style.minwidth = `${width}px`; }, .carI-list { height: 105px; display: flex; overflow-x: auto; padding-bottom: 10px; } .carI-list::-webkit-scrollbar { display: none; } .carI-list > li { width: 120px; height: 105px; margin: 0 12px; } .carI-list > li > img { width: 120px; height: 105px; border-radius: 2px; }