header.scss 2.2 KB


$navHei: 92px;
$navHeiM: 72px;

.v-header {
  height: $navHei;
  background-color: #fff;
  color: $cFontGray;
  position: relative;
  z-index: 1000;
  font-size: $fontSize;

  .header-container {
    max-width: 1200px;
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    position: relative;
  }

  .main-nav {
    height: 100%;
    flex: 1 0 auto;
  }

  .logo-img {
    margin-right: 43.2px;
    max-width: 213px;
    cursor: pointer;
  }

  .nav-list {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
  }

  .nav-item {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    -ms-flex-pack: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
  }

  .main-nav-list {
    display: flex;
    cursor: pointer;
  }

  .nav-item.link-item {
    padding: 0 50px;
    height: 60px;
  }

  .nav-item.search {
    flex: 1 1 auto;
  }

  .nav-item.auth {
    color: #ffffff;

    .lang {
      color: $cOrange;
      min-width: 96px;
    }
  }
}

.pc {
  display: block;
}

// 移动端导航
.mobile {
  display: none;

  &-nav-list {
    position: absolute;
    right: 0;
    top: 24px;

    display: flex;
    align-items: center;

    img {
      width: 20px;
      margin-left: 20px;
    }
  }

}

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


@media (max-width: 1100px) {
  .v-header {
    .logo-img {
      margin-right: 24px;
    }
  }

  .pc {

    .auth {
      margin-right: 20px;
    }

    .nav-item.auth {

      .lang {
        min-width: auto;
      }
    }
  }
}


@media (max-width: 980px) {
  .v-header {

    @include content-percent();

    .main-nav {}

    .logo-img {
      max-width: 213px;
      margin: 0;
    }

    .pc {
      display: none;
    }

    .mobile {
      display: block;

      &-nav-list {
        top: 32px;
      }
    }
  }
}

@media (max-width: 768px) {
  .v-header {

    // 原1200px临界样式

    .pc {
      display: none;
    }

    height: $navHeight-M;

    .logo-img {
      width: 186px;
      margin: 0;
    }

    .mobile {
      display: block;

      &-nav-list {
        top: 24px;
      }
    }
  }
}