﻿* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.container {
    position: absolute;
    height: 50px;
    width: 135px;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    text-align: center;
}

div div.ball {
    width: 20px;
    position: relative;
    display: inline-block;
    margin: 5px;
    height: 20px;
    border-radius: 50%;
    z-index: 999;
}

.b1 {
    background-color: rgb(235,14,23);
    animation: jump .5s ease 0s infinite alternate;
}

.b2 {
    background-color: navy;
    animation: jump .5s ease .15s infinite alternate;
}

.b3 {
    background-color: rgb(0,166,81);
    animation: jump .5s ease .25s infinite alternate;
}

.b4 {
    background-color: rgb(255,255,255);
    animation: jump .5s ease .35s infinite alternate;
}

.shadow {
    position: relative;
    opacity: .1;
    bottom: 20px;
    width: 20px;
    height: 5px;
    border-radius: 50%;
    background-color: black;
    display: inline-block;
    margin: 5px;
}

.s1 {
    animation: shrink .5s ease .0s infinite alternate;
}

.s2 {
    animation: shrink .5s ease .15s infinite alternate;
}

.s3 {
    animation: shrink .5s ease .25s infinite alternate;
}

.s4 {
    animation: shrink .5s ease .35s infinite alternate;
}

@keyframes jump {
    0% {
        transform: scaleY(.8);
    }

    100% {
        transform: translateY(-30px);
    }
}

@keyframes shrink {
    100% {
        transform: scaleX(.5);
        opacity: .01;
    }
}