
@import '~@scss/mixin.scss';

:local(.carousel){
  position: relative;
  height: 100%;
  width: 100%;
//   overflow: hidden;
  .carousel-list {
    &:hover .close-circle {
        display: inline-block;
    }
    .close-circle {
        display: none;
        position: absolute;
        top: 0;
        right: 0;
        transform: translate(50%, -50%);
        height: 20px;
        width: 20px;
    }

    position: relative;
    // 左右切换按钮
    .pre-btn, .next-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      height: 30px;
      width: 30px;
      z-index: 1;
      background-color: rgba(0,0,0,0);
    }
    .pre-btn {
      left: 20px;
      @include sprite-2x( -150px -308px);
    }
    .next-btn {
      right: 20px;
      @include sprite-2x( -121px -307px);
    }
    .pre-btn:hover, .next-btn:hover {
      cursor: pointer;
      color: rgb(255,255,255);
    }
    
    // 切换按钮
    .slick-dot {
      position: absolute;
      bottom: -40px;
      width: 100%;
      height: 40px;
      line-height: 40px;
      text-align: center;
      z-index: 0;
      li {
        display: inline-block;
        transition: all .2s ease-in-out;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        margin-right: 5px;
        background: #dbdbdb;
      }
      li:hover {
        cursor: pointer;
        background: #3897f0;
      }
      li.acitve {
        background: #3897f0;
      }
    }
  }
  .carousel-list, .carousel-item {
    height: 100%;
    width: 100%;
  }
  .carousel-item {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transition: all 1s;
  }
  .carousel-item.actived {
    opacity: 1;
  }
}
