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

跳转部分:
在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%;
}

 

posted on 2019-01-15 15:00  让我再想想  阅读(1393)  评论(0编辑  收藏  举报

导航