* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: #000;
  min-height: 200vh;
  width: 100%;
}
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.6s;
  padding: 40px 100px;
  /* 显示在背景图之上 */
  z-index: 999;
  /* border: 1px solid red; */
}
header .logo {
  position: relative;
  /* 字体宽度 */
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  font-size: 2em;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: 0.6s;
}

header ul {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
header ul li {
  position: relative;
  list-style: none;
}
header ul li a {
  position: relative;
  margin: 0 15px;
  text-decoration: none;
  color: #fff;
  /* letter-spacing: 2px; */
  transition: 0.6s;
  font-size: 20px;
}
.banner {
  position: relative;
  width: 100%;
  /* 必须是100vh，如果是100%,则高度为0，因为section本身没设置高度 */
  height: 100vh;
  background: url(bg.png) center center no-repeat;

  /* !把 background-attachment 属性设置为 "fixed"，才能保证该属性在 Firefox 和 Opera 中正常工作 */
  /* 固定图片，不随滚动条滚滚动 */
  background-attachment:fixed;
  background-size: cover;
}

/* 导航栏渐变样式 */
/* header.sticky之间不要有空格，否则识别不了 */
header.sticky {
  /* 通过修改内边距，造成文字移动的效果 */
  /* 因为内边距一下子缩小，所以文字就会往中间挤压移动 */
  padding: 5px 100px;
  background: #fff;
}
header.sticky .logo,
header.sticky ul li a {
  color: #000;
}
/* !响应式，适应手机，修改字体大小、边距 */
/* !大的要放在小的前面，不然也会覆盖响应的效果  max-width:780   max-width:500*/
@media(max-width:780px){
  header {
    padding: 20px 20px;
  }
  header ul li a{
    letter-spacing: 0;
    margin: 0 6px;
    font-size: 10px;
  }
  header.sticky {
  padding: 5px 10px;

  }
}

@media(max-width:500px){
  header {
    padding: 20px 5px;
  }
  header ul li a{
    letter-spacing: 0;
    margin: 0 2px;
    font-size: 10px;
  }
  header.sticky {
  padding: 5px 10px;

  }
}