Loading Animation With CSS Only

This is a simple example of loading animation with pure css.

HTML

<div class="container">
  <ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>

CSS

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    padding: 0;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

li {
    margin: 5px;
    display: inline-block;
    width: 15px;
    height: 200px;
    background-color: #000;
    border-top-right-radius: 15px;
    border-top-left-radius: 15px;
    transform-origin: bottom;
    animation: loading 0.7s linear infinite;
}

@keyframes loading {
    0% {
        transform: scaleY(0);
    }

    50% {
        transform: scaleY(1);
    }

    100% {
        transform: scaleY(0);
    }
}

li:nth-child(2) {
    animation-delay: 0.1s;
    background-color: #D672B0;
}

li:nth-child(3) {
    animation-delay: 0.2s;
}

li:nth-child(4) {
    animation-delay: 0.3s;
    background-color: #69CCEA;
}

li:nth-child(5) {
    animation-delay: 0.4s;
}

li:nth-child(6) {
    animation-delay: 0.5s;
    background-color: #E2E34E;
}