亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    小程序怎么做滾動(dòng)圖片

    小程序怎么做滾動(dòng)圖片

    左右滑動(dòng)可以切換展示圖片:

    <!--pages/test/test.wxml--> <!-- 組件 --> <swiper>   <swiper-item wx:for="{{imgUrls}}">     <image src='{{item}}' width="335" height="150" mode='widthFix' class='img' />   </swiper-item> </swiper>

    pages/test/test.js:

    // pages/test/test.js Page({   data: {     imgUrls:[       'http://dl.bizhi.sogou.com/images/1440x900/2014/05/14/611368.jpg',       'http://dl.bizhi.sogou.com/images/1440x900/2013/10/19/394877.jpg',                'http://img04.sogoucdn.com/app/a/100520093/ca86e620b9e623ff-d72d635343d5bade-dcf2acda7a45cb44f172db138bdf8d2d.jpg',     ]   },   //事件處理函數(shù)   toupper:function(){     console.log("觸發(fā)了toupper");   } })

    pages/test/test.wxss:

    .img{  width: 100%; }

    心得:

    swiper組件:滑塊視圖容器。

    可以為swiper添加autoplay屬性,是之自動(dòng)播放,例如:autoplay=”true”

    swiper組件中使用的是image單標(biāo)簽,而不是雙標(biāo)簽(否則報(bào)錯(cuò))。

    推薦:《小程序開發(fā)教程》

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)