<!--index.wxml-->
<scroll-view scroll-y style= "height:1000rpx; width: 2000rpx; display:flex; flex-direction: row;" >
<view wx:for="{{t}}" wx:for-item="t" src="{{t}}" style=" width: 250rpx; height: 250rpx;background:url('{{t}}');background-size:250rpx 250rpx; display:flex; flex-direction: row;">水果</view>
</scroll-view>
為什么我設(shè)置橫向顯示:flex-direction: row;無效呢?還多出了滾動條。
菜鳥問題,請多多指教!
網(wǎng)友回復:
<!--index.wxml-->
<scroll-view scroll-y style= "height:1000rpx; width: 2000rpx;" >
<image wx:for="{{t}}" wx:for-item="t" src="{{t}}" style=" width: 250rpx; height: 250rpx"></image>
<!-- <view wx:for="{{t}}" wx:for-item="t" src="{{t}}" style=" width: 250rpx; height: 250rpx;background:url('{{t}}');background-size:250rpx 250rpx; display:flex; flex-direction: row;">水果</view> -->
</scroll-view>
上面這段還代碼就能橫排
<!--index.wxml-->
<scroll-view scroll-y style= "height:1000rpx; width: 2000rpx;" >
<image wx:for="{{t}}" wx:for-item="t" src="{{t}}" style=" width: 250rpx; height: 250rpx"></image>
<view wx:for="{{t}}" wx:for-item="t" src="{{t}}" style=" width: 250rpx; height: 250rpx;background:url('{{t}}');background-size:250rpx 250rpx; display:flex; flex-direction: row;">水果</view>
</scroll-view>
、
view 控件是不能橫排的嗎