<div class="Loader"></div>
$Loader-color: #fff;
$Loader-size: 14.6rem;
$Loader-offset: 1.7rem;
$Loader-timing: ease-in-out;

.Loader {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: $Loader-size;
  margin-top: $Loader-size/2;
  margin-bottom: $Loader-size/2;
  &:before,
  &:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    animation-duration: 1.8s;
    animation-iteration-count: infinite;
    animation-timing-function: $Loader-timing;
    filter: drop-shadow(0 0 $Loader-offset/2.25 rgba($Loader-color, 0.75));
  }
  &:before {
    width: 100%;
    padding-bottom: 100%;
    box-shadow: inset 0 0 0 $Loader-offset $Loader-color;
    animation-name: pulsA;
  }
  &:after {
    width: calc(100% - #{$Loader-offset}*2);
    padding-bottom: calc(100% - #{$Loader-offset}*2);
    box-shadow: 0 0 0 0 $Loader-color;
    animation-name: pulsB;
  }
}

@keyframes pulsA {
  0% { box-shadow: inset 0 0 0 $Loader-offset $Loader-color; opacity: 1; }
  50%, 100% { box-shadow: inset 0 0 0 0 $Loader-color; opacity: 0; }
}

@keyframes pulsB {
  0%, 50% { box-shadow: 0 0 0 0 $Loader-color; opacity: 0; }
  100% { box-shadow: 0 0 0 $Loader-offset $Loader-color; opacity: 1; }
}
View Compiled

External CSS

  1. https://codepen.io#__TOOLS__/sonjastrieder/pen/abf169df77e0bc560c3d98672426fa26
  2. https://codepen.io#__BASE__/sonjastrieder/pen/e9a828d8e47cd73a24b9bc110e7d41fa

External JavaScript

  1. https://codepen.io/sonjastrieder/pen/56a60d968903c65fa7983f3e6877510e.js