当前位置: 代码迷 >> 综合 >> uni-app 导航横向滚动 scroll-view
  详细解决方案

uni-app 导航横向滚动 scroll-view

热度:38   发布时间:2023-11-23 03:33:08.0

代码:

<scroll-view scroll-x class="scroll-row"><view class="scroll-row-item">1</view><view class="scroll-row-item">2</view><view class="scroll-row-item">3</view><view class="scroll-row-item">4</view><view class="scroll-row-item">5</view>
</scroll-item>

样式:

.scroll-row{
    width:100%;white-space: nowrap;/*重点*/
}
.scroll-item{
    display:inline-block;margin-right:5rpx;width:200rpx;
}
  相关解决方案