css实现电梯导航的项目实践

  .box1{

  width: 80vw;

  height: 800px;

  background-color: aqua;

  }

  .box2{

  width:80vw ;

  height: 800px;

  background-color:chartreuse;

  }

  .box3{

  width: 80vw;

  height: 800px;

  background-color:red

  }

  .slidebar{

  display: flex;

  flex-direction: column;

  margin-left: 85vw;

  margin-top: 50px;

  position: fixed;

  }

  .slidebar a{

  text-align: center;

  width: 50px;

  height: 50px;

  font-size: 10px;

  }

  .slidebar a:nth-child(1) {

  background-color: aqua;

  }

  .slidebar a:nth-child(2) {

  background-color: chartreuse;

  }

  .slidebar a:nth-child(3) {

  background-color: red;

  }

  html{

  /* 页面滚动条滑动 */

  scroll-behavior: smooth;

  }