<div class="loader">
    <span></span>
    <span></span>
    <span></span>
</div>
.loader {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
}

.loader span {
    background: #000;
    display: inline-block;
    position: absolute;
    left: 6px;
    width: 13px;
    animation: spin 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
}

.loader span:nth-child(1) {
    left: 6px;
    animation-delay: -0.24s;
}

.loader span:nth-child(2) {
    left: 26px;
    animation-delay: -0.12s;
}

.loader span:nth-child(3) {
    left: 45px;
    animation-delay: 0;
}

@keyframes spin {
    0% {
        top: 6px;
        height: 51px;
    }
    50%, 100% {
        top: 19px;
        height: 26px;
    }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.