/* main spinner */
.spinner {
    margin:auto;
    padding: 20px;
    z-index: 1;
    height: 200px;
    width: 200px;
    /*transform: translate(-25%, -25%);*/
}

.spinner-small {
    margin:auto;
    padding: 10px;
    z-index: 1;
    height: 100px;
    width: 100px;
    /*transform: translate(-25%, -25%);*/
}

.spinner [class^=ball-], .spinner-small [class^=ball-] {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    transition: all 0.5s;
    animation: circleRotate 4s both infinite;
    transform-origin: 0 250% 0;
}

.spinner-small [class^=ball-] {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    transition: all 0.5s;
    animation: circleRotate 4s both infinite;
    transform-origin: 0 250% 0;
}

@keyframes circleRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(1440deg);
    }
}

.spinner .ball-1, .spinner-small .ball-1 {
    z-index: -1;
    background-color: #2196f3;
    animation-timing-function: cubic-bezier(0.5, 0.3, 0.9, 0.9);
}

.spinner .ball-2, .spinner-small .ball-2 {
    z-index: -2;
    background-color: #03a9f4;
    animation-timing-function: cubic-bezier(0.5, 0.6, 0.9, 0.9);
}

.spinner .ball-3, .spinner-small .ball-3 {
    z-index: -3;
    background-color: #00bcd4;
    animation-timing-function: cubic-bezier(0.5, 0.9, 0.9, 0.9);
}

.spinner .ball-4, .spinner-small .ball-4 {
    z-index: -4;
    background-color: #009688;
    animation-timing-function: cubic-bezier(0.5, 1.2, 0.9, 0.9);
}

.spinner .ball-5, .spinner-small .ball-5 {
    z-index: -5;
    background-color: #4caf50;
    animation-timing-function: cubic-bezier(0.5, 1.5, 0.9, 0.9);
}

.spinner .ball-6, .spinner-small .ball-6 {
    z-index: -6;
    background-color: #8bc34a;
    animation-timing-function: cubic-bezier(0.5, 1.8, 0.9, 0.9);
}

.spinner .ball-7, .spinner-small .ball-7 {
    z-index: -7;
    background-color: #cddc39;
    animation-timing-function: cubic-bezier(0.5, 2.1, 0.9, 0.9);
}

.spinner .ball-8, .spinner-small .ball-8 {
    z-index: -8;
    background-color: #ffeb3b;
    animation-timing-function: cubic-bezier(0.5, 2.4, 0.9, 0.9);
}
/* */