<div class="bar wave"></div>
<div class="bar wave"></div>
<div class="bar wave"></div>
<div class="bar wave"></div>
<div class="bar wave"></div>
html,body {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
background-color: #eaeaea;
}
.bar {
width: 20px;
height: 100px;
margin: 0 2px;
}
@keyframes wave {
0%, 50%, 100% {
background-color: orange;
transform: scale(1);
}
25% {
background-color: yellow;
transform: scale(1, 2);
}
75% {
background-color: red;
transform: scale(1, 0.5);
}
}
.wave {
animation-name: wave;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.wave:nth-child(1) {
animation-delay: 0.2s;
}
.wave:nth-child(2) {
animation-delay: 0.4s;
}
.wave:nth-child(3) {
animation-delay: 0.6s;
}
.wave:nth-child(4) {
animation-delay: 0.8s;
}
.wave:nth-child(5) {
animation-delay: 1s;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.