组件的学习
1.Swipe组件的学习:
<!--index.wxml--> <view class="container"> <swiper indicator-dots="true" autoplay="true" interval="3000" duration="1000" style = "width: 300px"> <swiper-item> <image src="http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" class="slide-image" width="355" height="150"/> </swiper-item> <swiper-item> <image src="http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg" class="slide-image" width="355" height="150"/> </swiper-item> <swiper-item> <image src="http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg" class="slide-image" width="355" height="150"/> </swiper-item> </swiper> </view>
注意要指定swipe的宽度,否则将不显示,因为默认width是0.
运行结果如下: