这是app.json里pages配置的首页,不知为何scroll-view里面放图片会出现这和以一大块的空位置
打开新的页面然后返回会变回原来的样子
下面是代码wxml代码:
<scroll-view scroll-x class=“region” >
<navigator class=“region_img region_img_1” url="/pages/cate/cate?id=1"><image mode=“widthFix” src="/images/ad.jpg" /></navigator>
<navigator class=“region_img” url="/pages/cate/cate?id=1"><image mode=“widthFix” src="/images/ad.jpg" /></navigator>
<navigator class=“region_img” url="/pages/cate/cate?id=1"><image mode=“widthFix” src="/images/ad.jpg" /></navigator>
<navigator class=“region_img” url="/pages/cate/cate?id=1"><image mode=“widthFix” src="/images/ad.jpg" /></navigator>
</scroll-view>
<scroll-view scroll-x class=“series” >
<navigator class=“series_li” >
<view class=“series_img”><image mode=“widthFix” src="/images/cate.png" /></view>
<view class=“series_title”>洗护神器</view>
</navigator>
<navigator class=“series_li” >
<view class=“series_img”><image mode=“widthFix” src="/images/cate.png" /></view>
<view class=“series_title”>洗护神器</view>
</navigator>
<navigator class=“series_li” >
<view class=“series_img”><image mode=“widthFix” src="/images/cate.png" /></view>
<view class=“series_title”>洗护神器</view>
</navigator>
<navigator class=“series_li” >
<view class=“series_img”><image mode=“widthFix” src="/images/cate.png" /></view>
<view class=“series_title”>洗护神器</view>
</navigator>
<navigator class=“series_li” >
<view class=“series_img”><image mode=“widthFix” src="/images/cate.png" /></view>
<view class=“series_title”>洗护神器</view>
</navigator>
<navigator class=“series_li” >
<view class=“series_img”><image mode=“widthFix” src="/images/cate.png" /></view>
<view class=“series_title”>洗护神器</view>
</navigator>
</scroll-view>
下面是wxss代码:
.region_img_1{padding-left:20rpx;}
.region_img{display:inline-block;width:80%;font-size:0;padding-right:20rpx;}
.series{background:white;white-space:nowrap;padding:30rpx 0;font-size:0;}
.series_li{display:inline-block;width:17%;padding:0 20rpx;}
.series_img{}
.series_title{font-size:26rpx;text-align:center;}