index.wxss 1.39 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
.container{
  width: 100%;
  height: 200rpx;
  padding: 0 0 20rpx;
}
/**index.wxss**/
  .card-swiper{
    position: relative;
    width: 100%;
    height: 100%;
    color: #666;
    font-size: 28rpx;
  }

.card-swiper-item{
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 92%;
    transition: all .3s ease-out;
    z-index: 0;
    display: none;
    overflow: hidden;
  }
  
  .card-swiper .card-swiper-item.curdistance0{
    z-index: 10;
    display: flex;
  }
  
  .card-swiper .card-swiper-item.curdistance1{
    display: flex;
    z-index: 9;
    transform: scale(.95);
    opacity: .7;
    left: 40rpx;
  }
  .card-swiper .card-swiper-item.curdistance2{
    display: flex;
    z-index: 8;
    transform: scale(.9);
    opacity: .4;
    left: 80rpx;
  }
  
  .ani-slide-up{
    display: flex;
    animation: slideUp .6s ease-out;
    z-index: 11;
    /* transform: rotate(25deg); */
  }
  
  .ani-slide-down{
    display: flex;
    animation: slideUp .6s ease-in;
    animation-direction: reverse;
  }
  
  
  @keyframes slideUp{
    0% {
    }
    70% {
      opacity: 1;
    }
    100% {
      transform: translateX(-1000rpx);
      opacity: 0;
      -webkit-transform: translateX(-1000rpx);
      -moz-transform: translateX(-1000rpx);
      -ms-transform: translateX(-1000rpx);
      -o-transform: translateX(-1000rpx);
}
  }