.loader {
  width: 200px;
  height: 200px;
  display: inline-block;
  position: relative;
  border: 2px solid #fff;
  box-sizing: border-box;
  animation: rotation 4s linear infinite;
  position: fixed;
  top: 50%;
  left: 50%;
  margin-left: -100px;
  margin-top: -100px;
}
.loader::after,
.loader::before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 2px solid #ccc;
  width: 150px;
  height: 150px;
  animation: rotationBack 3s linear infinite;
  transform-origin: center center;
}
.loader::before {
  width: 100px;
  height: 100px;
  border-color: #ddd;
  box-sizing: border-box;
  animation: rotation 2s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes rotationBack {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}
