.loading {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  margin-top: 10px;
  position: relative;
  animation: load 3s linear infinite;
}

.loading .outer {
  width: 100%;
  height: 100%;
  position: absolute;
}

.loading .inner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9c6;
  position: absolute;
  left: 50%;
  animation: changeBgColor 3s ease infinite;
}

@keyframes load {
  0% {
    transform: rotate(0deg);
  }

  33.3% {
    transform: rotate(120deg);
  }

  66.6% {
    transform: rotate(240deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes changeBgColor {
  0%, 100% {
    background: #9c6;
  }

  33.3% {
    background: #ff6;
  }

  66.6% {
    background: #f66;
  }
}

.loading .outer:nth-child(2) {
  transform: rotate(72deg);
}

.loading .outer:nth-child(3) {
  transform: rotate(144deg);
}

.loading .outer:nth-child(4) {
  transform: rotate(216deg);
}

.loading .outer:nth-child(5) {
  transform: rotate(288deg);
}

.loading .outer:nth-child(2) .inner {
  animation-delay: 1s;
}

.loading .outer:nth-child(3) .inner {
  animation-delay: 2s;
}
.loading .outer:nth-child(4) .inner {
  animation-delay: 1s;
}

.loading .outer:nth-child(5) .inner {
  animation-delay: 2s;
}