<scroll-view scroll-x="true">
<view class='upContent'>
<block wx:for='{{Items}}'>
<view bindtap='choseKind' data-id='{{item.Id}}'>
<view class='upContentView'>
<image mode='aspectFill' class='upContentPic' src='{{item.Picture}}'></image>
<text class='upContentText'>{{item.Name}}</text>
</view>
</view>
</block>
</view>
</scroll-view>
|
|
.upContent{
display: flex;
margin: 0 20rpx 0 20rpx;
width: 100%;
height: 380rpx;
flex-direction: row;
justify-content: space-between;
}
.upContentPic{
display: block;
border-radius: 10rpx;
width:200rpx;
height: 280rpx;
}
.upContentText{
display: block;
width: 200rpx;
font-size: 30rpx;
text-align: center;
font-family: '方正黑体简体';
}
.upContentView{
width: 200rpx;
height: 320rpx;
margin: 10rpx;
}
|
这个代码在安卓下是好好的,横向滚动显示图片,但是在苹果6S下图片全部挤在一起,无法滑动。求大神帮帮忙啊