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

 

相关文章:

  • 2021-12-25
  • 2021-07-02
  • 2021-07-03
猜你喜欢
  • 2022-12-23
  • 2021-05-22
  • 2021-12-12
  • 2021-11-23
  • 2021-12-19
  • 2021-05-01
相关资源
相似解决方案