本站查看全文css样式文件-纯CSS实现117个loading效果


本站查看全文css样式文件

<div class="loading">
  <div class="shape shape-1"></div>
  <div class="shape shape-2"></div>
  <div class="shape shape-3"></div>
  <div class="shape shape-4"></div>
</div>

<style>
.loading {
  width: 30px;
  height: 30px;
  position: relative;
}

.shape {
  width: 10px;
  height: 10px;
  position: absolute;
  top: 40%;
  opacity: 0.5;
}

.shape-1 {
  background-color: #1875e5;
  left: -20px;
  animation: animationShape1 1.5s ease infinite;
}

.shape-2 {
  background-color: #c5523f;
  left: 0px;
  animation: animationShape2 1.5s ease infinite 0.5s;
}

.shape-3 {
  background-color: #499255;
  left: 20px;
  animation: animationShape3 1.5s ease infinite 0.8s;
}

.shape-4 {
  background-color: #f2b736;
  left: 40px;
  animation: animationShape4 1.5s ease infinite 1s;
}

@keyframes animationShape1 {
  0% {
    transfrom: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.5);
    opacity: 1;
  }

  100% {
    transfrom: scale(0.5);
    opacity: 0.5;
  }
}

@keyframes animationShape2 {
  0% {
    transfrom: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.5);
    opacity: 1;
  }

  100% {
    transfrom: scale(0.5);
    opacity: 0.5;
  }
}

@keyframes animationShape3 {
  0% {
    transfrom: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.5);
    opacity: 1;
  }

  100% {
    transfrom: scale(0.5);
    opacity: 0.5;
  }
}

@keyframes animationShape4 {
  0% {
    transfrom: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.5);
    opacity: 1;
  }

  100% {
    transfrom: scale(0.5);
    opacity: 0.5;
  }
}
</style>

更多更精彩的内容请查看以下链接,本文来源与网络以下链接,若有侵权请联系本人删除,谢谢

https://juejin.cn/post/7037636080539009038