scroll-view里面内容为什么换行?

3131975015
  • 411

怎样才能不换行??设置了scroll-x为什么不管用?

<scroll-view class="showItem3" scroll-x="true">
            <view class="showItem3_item">
                1
            </view>
            <view class="showItem3_item">
                2
            </view>
            <view class="showItem3_item">
                3
            </view>
</scroll-view>
.showItem3{
        height: 550rpx;
        white-space: nowrap;
        display: flex;
        width: 750rpx;
        flex-wrap: nowrap;
    }
    .showItem3_item{
         width: 280rpx;
         height: 280rpx;
         margin-left: 10rpx;
         display: flex;
         flex-direction: column;
         justify-content: center;
         align-items: center;
         border-radius: 20rpx;
         border: 1px solid #ccc;
    }
回复
阅读 211
1 个回答

image.png

开启flex布局

你知道吗?

宣传栏