body {
    margin: 0;
    padding: 0;
    
}

.container {
    width: 0px;
    height: 100px;
    z-index: -1;
    margin: 0 auto;
    background: none;
    transform: rotate(90deg);
    padding-left: 40px;
    margin-left: 300px;
}

.ball {
    width: 20px;
    height: 20px;
    margin: 20px auto;
    border-radius: 50px;
    background: #ff6600;
}

.ball:nth-child(1) {
    background: #ff6600;
    -webkit-animation: right 1s infinite ease-in-out;
    -moz-animation: right 1s infinite ease-in-out;
    animation: right 1s infinite ease-in-out;
}

.ball:nth-child(2) {
    background: #009900;
    -webkit-animation: left 1.1s infinite ease-in-out;
    -moz-animation: left 1.1s infinite ease-in-out;
    animation: left 1.1s infinite ease-in-out;
}

.ball:nth-child(3) {
    background: #ff0033;
    -webkit-animation: right 1.05s infinite ease-in-out;
    -moz-animation: right 1.05s infinite ease-in-out;
    animation: right 1.05s infinite ease-in-out;
}

.ball:nth-child(4) {
    background: #3366cc;
    -webkit-animation: left 1.15s infinite ease-in-out;
    -moz-animation: left 1.15s infinite ease-in-out;
    animation: left 1.15s infinite ease-in-out;
}

.ball:nth-child(5) {
    background: #ffcc00;
    -webkit-animation: right 1.1s infinite ease-in-out;
    -moz-animation: right 1.1s infinite ease-in-out;
    animation: right 1.1s infinite ease-in-out;
}

.ball:nth-child(6) {
    background: #ff0033;
    -webkit-animation: left 1.05s infinite ease-in-out;
    -moz-animation: left 1.05s infinite ease-in-out;
    animation: left 1.05s infinite ease-in-out;
}

.ball:nth-child(7) {
    background: #3366cc;
    -webkit-animation: right 1s infinite ease-in-out;
    -moz-animation: right 1s infinite ease-in-out;
    animation: right 1s infinite ease-in-out;
}

@-webkit-keyframes right {
    0% {
        -webkit-transform: translate(-15px);
    }
    50% {
        -webkit-transform: translate(15px);
    }
    100% {
        -webkit-transform: translate(-15px);
    }
}

@-webkit-keyframes left {
    0% {
        -webkit-transform: translate(15px);
    }
    50% {
        -webkit-transform: translate(-15px);
    }
    100% {
        -webkit-transform: translate(15px);
    }
}

@-moz-keyframes right {
    0% {
        -moz-transform: translate(-15px);
    }
    50% {
        -moz-transform: translate(15px);
    }
    100% {
        -moz-transform: translate(-15px);
    }
}

@-moz-keyframes left {
    0% {
        -moz-transform: translate(15px);
    }
    50% {
        -moz-transform: translate(-15px);
    }
    100% {
        -moz-transform: translate(15px);
    }
}

@keyframes right {
    0% {
        transform: translate(-15px);
    }
    50% {
        transform: translate(15px);
    }
    100% {
        transform: translate(-15px);
    }
}

@keyframes left {
    0% {
        transform: translate(15px);
    }
    50% {
        transform: translate(-15px);
    }
    100% {
        transform: translate(15px);
    }
}