微信小程序(三)页面跳转和图片滑动切换


跳转部分:
在index2.wxml中,添加跳转函数,如下所示:
 
 
wxml代码:
<!--pages/list/list.wxml-->
<view>
<swiper indicator-dots indicator-color='yellowgreen'
indicator-active-color='pink'>
<swiper-item>
<image src="/static/images/a.jpg"></image>
</swiper-item>
<swiper-item>
<image src="/static/images/y.jpg"></image>
</swiper-item>
<swiper-item>
<image src="/static/images/s.jpg"></image>
</swiper-item>
<swiper-item>
<image src="/static/images/t.jpg"></image>
</swiper-item>
</swiper>
</view>

wxss样式代码如下:

swiper{
width:100%;
height:400rpx;
}
swiper image{
width:100%;
height:100%;
}

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM