Load样式——1

1.html代码

<div class="spinner">
    <div class="rect1">L</div>
    <div class="rect2">O</div>
    <div class="rect3">A</div>
    <div class="rect4">D</div>
    <div class="rect5">I</div>
    <div class="rect6">N</div>
    <div class="rect7">G</div>
</div>    

2.css

body{
    background-color: #66FFCC;
}

.spinner {
  margin: 250px auto;
   200px;
  height: 240px;
  text-align: center;
  line-height:240px;   
  font-size: 20px;
}
 
.spinner > div {
  background-color: #FF0000;
  height: 80%;
   20px;
  display: inline-block;
   
  -webkit-animation: stretchdelay 1.2s infinite ease-in-out;
  animation: stretchdelay 1.2s infinite ease-in-out;
}
 
.spinner .rect2 {
  -webkit-animation-delay: -1.1s;
  animation-delay: -1.1s;
  background-color: #FF9900;
}
 
.spinner .rect3 {
  -webkit-animation-delay: -1.0s;
  animation-delay: -1.0s;
  background-color: #FFFF00;
}
 
.spinner .rect4 {
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
  background-color: #00FF00;
}
 
.spinner .rect5 {
  -webkit-animation-delay: -0.8s;
  animation-delay: -0.8s;
  background-color: #00FFFF;
}

.spinner .rect6 {
  -webkit-animation-delay: -0.7s;
  animation-delay: -0.7s;
  background-color: #0000FF;
}

.spinner .rect7 {
  -webkit-animation-delay: -0.6s;
  animation-delay: -0.6s;
  background-color: #9900FF;
}
 
@-webkit-keyframes stretchdelay {
  0%, 40%, 100% { -webkit-transform: scaleY(0.4) } 
  20% { -webkit-transform: scaleY(1.0) }
}
 
@keyframes stretchdelay {
  0%, 40%, 100% {
    transform: scaleY(0.4);
    -webkit-transform: scaleY(0.4);
  }  20% {
    transform: scaleY(1.0);
    -webkit-transform: scaleY(1.0);
  }
}
原文地址:https://www.cnblogs.com/kongkongFabian/p/7242709.html