开发者工具scroll-view的bug
发布于 5 年前 作者 weitan 2903 次浏览 来自 问答

这是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;}

1 回复

求解?这问题手机上也是

回到顶部