<main class="main"></main>
body {
  background: #163038;
  width: 100%;
  box-sizing: border-box;
}
main {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}
.loader-container {
  flex: 1 1 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  color: #fff;
  position: relative;
}
.loader h3,
h4,
h5,
h6 {
  position: absolute;
}
.loader-container:nth-child(2n + 1) {
  background: rgba(0, 0, 0, 0.3);
}

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

#loader-1 {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-radius: 50%;
  border-bottom-color: transparent;
  animation: rotation 1s linear infinite;
}

#loader-2 {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-radius: 50%;
  border-bottom-color: #ff3d00;
  animation: rotation 1s linear infinite;
}

#loader-3 {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-radius: 50%;
  animation: rotation 1s linear infinite;
  position: relative;
}

#loader-3::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-radius: 50%;
  border-bottom-color: #ff3d00;
  position: absolute;
  /*   top: 50%; */
  /*   left: 50%; */
  /*   transform: translate(-50%, -50%); */
}

#loader-4 {
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  animation: rotation 1s linear infinite;
  position: relative;
  background: linear-gradient(0deg, rgba(255, 61, 0, 0.2) 33%, #ff3d00 100%);
}

#loader-4::after {
  content: "";
  width: 44px;
  height: 44px;
  position: absolute;
  /*   top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) */
  border-radius: 50%;
  background: #163038;
}

#loader-5 {
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  animation: rotation 1s linear infinite;
  position: relative;
  background: linear-gradient(0deg, rgba(255, 61, 0, 0.2) 33%, #ff3d00 100%);
}

#loader-5::after {
  content: "";
  width: 44px;
  height: 44px;
  position: absolute;
  /*   top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) */
  border-radius: 50%;
  /*   background: #263238; */
}

#loader-6 {
  width: 48px;
  height: 48px;
  border-top: 5px solid #fff;
  border-radius: 50%;
  animation: rotation 1s linear infinite;
}

#loader-7 {
  width: 48px;
  height: 48px;
  border-top: 5px solid #fff;
  border-right: 5px solid #fff;
  border-radius: 50%;
  animation: rotation 1s linear infinite;
}

#loader-8 {
  width: 48px;
  height: 48px;
  border-top: 5px solid #fff;
  border-right: 5px solid transparent;
  border-radius: 50%;
  animation: rotation 1s linear infinite;
}

#loader-9 {
  width: 48px;
  height: 48px;
  border-top: 5px solid #fff;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-radius: 50%;
  animation: rotation 1s linear infinite;
}

@keyframes progressbar {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

#loader-11 {
  width: 80%;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

#loader-11::after {
  content: "";
  width: 50%;
  height: 10px;
  border-radius: 5px;
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
  position: absolute;
  animation: progressbar 2s linear infinite;
}

@keyframes animFillWidth {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

#loader-12 {
  width: 80%;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
}

#loader-12::after {
  content: "";
  width: 0%;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
  position: absolute;
  animation: animFillWidth 2s linear infinite;
}

@keyframes loading {
  0% {
    box-shadow: 10px 0 rgba(255, 255, 255, 0), 20px 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 10px 0 rgba(255, 255, 255, 1), 20px 0 rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 10px 0 rgba(255, 255, 255, 1), 20px 0 rgba(255, 255, 255, 1);
  }
}

#loader-16 {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
  position: relative;
}

#loader-16::after {
  content: "";
  width: 4px;
  height: 4px;
  background: currentColor;
  position: absolute;
  top: 3px;
  right: -8px;
  animation: loading 2s linear infinite;
}
const main = document.querySelector(".main");

for (let i = 1; i <= 20; ++i) {
  let node = `<div class="loader-container"><h4>${i}</h4><span class="loader"  id=loader-${i} ><span></div>`;
  if (i >= 16) {
    node = `<div class="loader-container"><h3>Loading</h3><span class="loader"  id=loader-${i} ><span></div>`;
  }
  main.insertAdjacentHTML("beforeend", node);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.