微信小程序幻灯片简单代码

1,085 views

wxml

<view class=”haibao”>
<swiperindicator-dots=”{{indicatorDots}}”autoplay=”{{autoplay}}”interval=”{{interval}}”duration=”{{duration}}”style=”height:80px;”>
<blockwx:for=”{{imgUrls}}”>
<swiper-item>
<imagesrc=”{{item}}”style=”width:100%;height:80px;”></image>
</swiper-item>
</block>
</swiper>
</view>

JS

indicatorDots:false,
autoplay:true,
interval:5000,
duration:1000,
imgUrls:[
‘/images/haibao/1.jpg’,
‘/images/haibao/2.jpg’,
‘/images/haibao/3.jpg’
],

 

 

如果您觉得这篇文章对您有帮助,欢迎继续关注本站!!!我要赞助本站>>>

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注