CSS
.loading {
background-color: #9b59b6;
overflow: hidden;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
}
.loading ul {
list-style: none;
position: absolute;
left: calc(50% - 0.7em);
top: calc(50% - 4.2em);
display: inline-block;
text-indent: 2.8em;
}
.loading ul li:after,
.loading ul:after {
width: 1.2em;
height: 1.2em;
background-color: #fff;
border-radius: 100%;
}
.loading ul li:after,
.loading ul:after {
content: "";
display: block;
}
.loading ul:after {
position: absolute;
top: 2.8em;
left: 0;
}
.loading li {
position: absolute;
padding-bottom: 5.6em;
top: 0;
left: 0;
}
.loading li:nth-child(1) {
transform: rotate(0deg);
animation-delay: 0.125s;
}
.loading li:nth-child(1):after {
animation-delay: 0.125s;
}
.loading li:nth-child(2) {
transform: rotate(36deg);
animation-delay: 0.25s;
}
.loading li:nth-child(2):after {
animation-delay: 0.25s;
}
.loading li:nth-child(3) {
transform: rotate(72deg);
animation-delay: 0.375s;
}
.loading li:nth-child(3):after {
animation-delay: 0.375s;
}
.loading li:nth-child(4) {
transform: rotate(108deg);
animation-delay: 0.5s;
}
.loading li:nth-child(4):after {
animation-delay: 0.5s;
}
.loading li:nth-child(5) {
transform: rotate(144deg);
animation-delay: 0.625s;
}
.loading li:nth-child(5):after {
animation-delay: 0.625s;
}
.loading li:nth-child(6) {
transform: rotate(180deg);
animation-delay: 0.75s;
}
.loading li:nth-child(6):after {
animation-delay: 0.75s;
}
.loading li:nth-child(7) {
transform: rotate(216deg);
animation-delay: 0.875s;
}
.loading li:nth-child(7):after {
animation-delay: 0.875s;
}
.loading li:nth-child(8) {
transform: rotate(252deg);
animation-delay: 1s;
}
.loading li:nth-child(8):after {
animation-delay: 1s;
}
.loading li:nth-child(9) {
transform: rotate(288deg);
animation-delay: 1.125s;
}
.loading li:nth-child(9):after {
animation-delay: 1.125s;
}
.loading li:nth-child(10) {
transform: rotate(324deg);
animation-delay: 1.25s;
}
.loading li:nth-child(10):after {
animation-delay: 1.25s;
}
.loading li {
animation: dotAnimation 2.5s infinite;
}
@keyframes dotAnimation {
0%, 55%, 100% {
padding: 0 0 5.6em 0;
}
5%,50% {
padding: 2.8em 0;
}
}
.loading li:after {
animation: dotAnimationTwo 2.5s infinite;
}
@-webkit-keyframes animate {
0%, 55%, 100% {
opacity: 1;
transform: scale(1);
}
5%,50% {
opacity: .5;
transform: scale(0.5);
}
}