浏览代码

轮播

tags/河北版C.8.1.01
caserKing 5 年前
父节点
当前提交
d39455a237
共有 2 个文件被更改,包括 9 次插入8 次删除
  1. +2
    -2
      components/banner/index.wxml
  2. +7
    -6
      components/banner/index.wxss

+ 2
- 2
components/banner/index.wxml 查看文件

@@ -5,8 +5,8 @@
<image data-id="{{item.id}}" data-data="{{item}}" mode='widthFix' bindtap='gotobannerdetail' src="{{item.coverImg}}" class="index-slide-image" />
</swiper-item>
</block>
</swiper> -->
<swiper class="imageContainer" bindchange="handleChange" previous-margin="70rpx" next-margin="70rpx" circular autoplay>
</swiper>autoplay -->
<swiper class="imageContainer" bindchange="handleChange" previous-margin="39rpx" next-margin="40rpx" circular>
<block wx:for="{{list}}" wx:key="{{index}}">
<swiper-item class="item">
<image class="itemImg {{currentIndex == index ? 'active': ''}}" src="{{item.coverImg}}"></image>


+ 7
- 6
components/banner/index.wxss 查看文件

@@ -56,24 +56,25 @@
}
.itemImg{
position: absolute;
width: 670rpx;
height: 238rpx;
width: 640rpx;
height: 248rpx;
border-radius: 15rpx;
overflow: hidden;
z-index: 5;
opacity: 0.7;
top: 15%;
margin: 0 20rpx;
}
.active{
opacity: 1;
z-index: 10;
width: 670rpx;
height: 304rpx;
top: 7%;
width: 640rpx;
height: 270rpx;
top: 11%;
transition:all .2s ease-in 0s;
}
.item{
width: 670rpx!important;
width: 100%;
height: 304rpx;
overflow: hidden;
border-radius: 16rpx;

正在加载...
取消
保存