index.scss 4.67 KB
@import '@/styles/_support.scss';

.content {
  padding-bottom: 2.25rem;
}

.top-space {
  height: 2.25rem;
}

.box {
  position: relative;
  margin-top: $marginMedium;
}

// banner 轮播
.banner-contaner {
  width: 100%;
  height: 470px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

// PC轮播
.banner-pc {
  display: block;
  position: absolute;
  z-index: 1;
  left: 50%;
  margin-left: -960px;
  top: 0;
  width: 1920px;
  height: 100%;
  overflow: hidden;

  .banner-img {
    width: 100%;
    height: 100%;
  }

  .btn-wrap {
    position: absolute;
    z-index: 1;
    // 两个banner图按钮位置不一样,和原先约定的按钮位置固定不一致
    // 如要调整位置,请调整top,right。如需要右对齐请使用right
    // 已用padding适应文本过长的情况(英文等);
    // top: 272px;
    // left: 1228px;
    // top: 310px;
    top: 295px;
    right: 432px;
    display: flex;

    .banner-btn {
      @extend .pointer;
      @extend .bb;
      @include btc2(126px, 48px, $fontSizeTitle);
      width: auto;
      padding: 0 24px;
      min-width: 126px;
      margin-left: 12px;
      background-image: none;
    }
  }
}

// 移动端轮播
.banner-mobile {
  display: none;

  .banner-img {
    width: 100%;
  }

  .btn-wrap {
    position: absolute;
    z-index: 1;
    top: 87%;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;

    .banner-btn {
      @extend .pointer;
      padding: 0 12px;
      color: $cOrange;
    }
  }
}

// 推荐产品
.recommend {
  display: flex;
  text-align: center;
  justify-content: space-between;
  flex-wrap: wrap;

  &-item {
    @extend .bb;

    margin-right: $marginSmall;

    &:last-child {
      margin-right: 0;
    }


    position: relative;
    width: 24.25rem;
    // width: 100%;
    height: 32.75rem;
    border-radius: $borderRadiusSmall;
    @extend .box-shadow;
    background-color: #fbfbfb;

    .img {
      width: 100%;
      height: 24.25rem;
      background-size: cover;
    }

    .img1 {
      background: url("~@/assets/images/index/recommend-1.png") no-repeat center;
      background-size: cover;
    }

    .img2 {
      background: url("~@/assets/images/index/recommend-2.png") no-repeat center;
      background-size: cover;
    }

    .img3 {
      background: url("~@/assets/images/index/recommend-3.png") no-repeat center;
      background-size: cover;
    }

    .img4 {
      background: url("~@/assets/images/index/recommend-4.png") no-repeat center;
      background-size: cover;
    }


    .btn {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 3rem;
      margin: 0 auto;

      @include btc2(13.5rem, 4rem, 16px);
    }

    img {
      width: 100%;
      @include border-top-radius($borderRadius);
    }

    &:first-child {
      padding-left: 0;
    }

    &:last-child {
      padding-right: 0;
    }
  }
}

// 详情
.detail {
  display: flex;
  max-width: 1200px;


  .txt {
    position: relative;
    @extend .fcc;
    @extend .bb;
    @include ellipsis(14);
    padding-left: 26px;
    flex: 1;
    line-height: 2.3;

  }

  .txt:lang(zh) {
    letter-spacing: 1.4px;
  }
}


.swiper-button-prev {
  background-image: url('~@/assets/images/common/button-prev.png');
  left: 360px;

}

.swiper-button-next {
  background-image: url('~@/assets/images/common/button-next.png');
  right: 360px;
}

.swiper-container {
  height: 100%;
}

.swiper-pagination-fraction,
.swiper-pagination-custom,
.swiper-container-horizontal>.swiper-pagination-bullets {
  bottom: 48px;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background-color: #dcdddd;
}

.swiper-pagination-bullet-active {
  width: 12px;
  height: 12px;
  background-color: $cOrange;
}

.box-shadow {
  box-shadow: 0 0 1.5rem 0 rgba(255, 87, 0, 0.15);
}

@media (max-width: 1200px) {
  .content {
    @include content-percent();
  }

  // 推荐产品
  .recommend {
    justify-content: center;

    &-item {
      width: 46% !important;
      padding: 0 !important;
      margin: 2% !important;
    }
  }

  // 详情
  .detail {
    display: block;

    .vjs-custom-skin {
      width: 100%;
    }


    .txt {
      padding: 0;
      margin: $marginSmall 0 $marginMedium;
    }
  }
}


@media (max-width: 768px) {
  .content {}

  .banner-contaner {
    height: auto;
  }

  .banner-pc {
    display: none;
  }

  .banner-mobile {
    display: block;
  }

  // 推荐产品
  .recommend {
    &-item {
      width: 100% !important;
      margin: $marginSmall-M auto !important;
    }
  }

  .box-shadow {
    box-shadow: none;
  }

  .swiper-pagination-fraction,
  .swiper-pagination-custom,
  .swiper-container-horizontal>.swiper-pagination-bullets {
    bottom: 2px;
  }

}