小程序轮播图

<!-- 轮播图 -->
<swiper class="imageContainer" bindchange="handleChange" previous-margin="50rpx" next-margin="50rpx" circular autoplay>
  <block wx:for="{{array}}" wx:key="{{index}}" wx:for-item="item">
    <swiper-item class="item">
     <navigator url='/pages/tg_details/tg_details'>
      <image class="ima itemImg {{currentIndex == index ? 'active': ''}}" src="{{item.src}}">
        <h1 class="swiper_h1">{{item.h1}}</h1>
        <p class="swiper_p">¥{{item.sale}} 拼价团</p>
        <p class="swiper_p2">
          <del>¥{{item.price}}</del>
        </p>
        <view class="swiper_b">
          <p>{{item.all}}</p>
          <p>人拼团</p>
        </view>
        <view class="swiper_b2">
          <p>还差</p>
          <p>{{item.num}}</p>
          <p>人拼成</p>
        </view>
        <view class="swiper_b3">{{item.stat}}</view>
      </image>
      </navigator>
    </swiper-item>
    
  </block>
</swiper>
<!-- 轮播图完 -->
array:[{
      src:'images/4.png' ,
      h1:'嵛山岛-周末两日游',
      sale:'180',
      price:'1800',
      all:'18',
      num:'2',
      stat:'HOT'
           },
           {
      src:'images/4.png',
      h1: '桂林山水-七日游',
      sale: '320',
      price: '4500',
      all: '54',
      num: '6',
      stat: 'HOT'      
           },
           {
      src: 'images/4.png',
      h1: '乐山大佛-七日游',
      sale: '120',
      price: '1500',
      all: '84',
      num: '16',
      stat: 'HOT'      
           }
    ]
/* 轮播图 */
.imageContainer{
 width: 100%;
 height: 500rpx;
 background: white;
 border:0rpx solid black;
 box-sizing: border-box;
}
.item{
 height: 500rpx;
}
.itemImg{
 position: absolute;
 width: 95%;
 text-align: center;
 height: 380rpx;
 border-radius: 20rpx;
 z-index: 5;
 opacity: 0.7;
 top: 13%;
 margin:auto;
 left:0;
 right:0;
}
.active{
 opacity: 1;
 z-index: 10;
 height: 430rpx;
 top: 7%;
 transition:all .2s ease-in 0s;
}
/* 轮播图完 */

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值