Blame view

src/components/home/header/header.scss 2.24 KB
simon committed
1
@import '@/styles/_support.scss';
simon committed
2

simon committed
3 4
$navHei: 92px;
$navHeiM: 72px;
simon committed
5

simon committed
6
.v-header {
simon committed
7
  height: $navHei;
simon committed
8
  background-color: #fff;
simon committed
9
  color: $cFontGray;
simon committed
10
  position: relative;
simon committed
11
  z-index: 1000;
simon committed
12
  font-size: $fontSize;
simon committed
13 14

  .header-container {
simon committed
15
    max-width: 1200px;
simon committed
16 17 18 19 20 21 22 23 24 25 26 27 28
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    position: relative;
  }

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

  .logo-img {
simon committed
29 30
    margin-right: 43.2px;
    max-width: 213px;
simon committed
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
    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;
simon committed
60
    height: 60px;
simon committed
61 62 63 64 65 66 67 68 69 70
  }

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

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

    .lang {
simon committed
71
      color: $cOrange;
simon committed
72
      min-width: 96px;
simon committed
73 74 75 76
    }
  }
}

simon committed
77 78 79 80
.pc {
  display: block;
}

simon committed
81
// 移动端导航
simon committed
82 83
.mobile {
  display: none;
simon committed
84 85 86 87

  &-nav-list {
    position: absolute;
    right: 0;
simon committed
88
    top: 24px;
simon committed
89 90 91 92 93 94 95 96 97 98

    display: flex;
    align-items: center;

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

simon committed
99
}
simon committed
100

simon committed
101 102
@media (max-width: 1200px) {
  .v-header {
simon committed
103
    @include content-percent(1%);
simon committed
104 105
  }
}
simon committed
106

simon committed
107 108

@media (max-width: 1100px) {
simon committed
109 110
  .v-header {
    .logo-img {
simon committed
111
      margin-right: 24px;
simon committed
112 113 114
    }
  }

simon committed
115
  .pc {
simon committed
116

simon committed
117 118 119
    .auth {
      margin-right: 20px;
    }
simon committed
120 121 122 123 124 125 126

    .nav-item.auth {

      .lang {
        min-width: auto;
      }
    }
simon committed
127 128 129 130
  }
}


simon committed
131 132
@media (max-width: 980px) {
  .v-header {
simon committed
133

simon committed
134
    @include content-percent();
simon committed
135

simon committed
136
    .main-nav {}
simon committed
137

simon committed
138
    .logo-img {
simon committed
139
      max-width: 213px;
simon committed
140 141
      margin: 0;
    }
simon committed
142

simon committed
143 144 145
    .pc {
      display: none;
    }
simon committed
146

simon committed
147 148
    .mobile {
      display: block;
simon committed
149

simon committed
150 151 152 153 154 155
      &-nav-list {
        top: 32px;
      }
    }
  }
}
simon committed
156

simon committed
157 158
@media (max-width: 768px) {
  .v-header {
simon committed
159 160

    // 原1200px临界样式
simon committed
161

simon committed
162 163 164 165
    .pc {
      display: none;
    }

simon committed
166
    height: $navHeight-M;
joe committed
167 168

    .logo-img {
simon committed
169
      width: 186px;
joe committed
170 171 172
      margin: 0;
    }

simon committed
173 174
    .mobile {
      display: block;
simon committed
175

simon committed
176 177 178 179
      &-nav-list {
        top: 24px;
      }
    }
simon committed
180 181
  }
}