Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="loader-align">
 <div class="loader" style="width:100%;">
  <div class="loading"><h2>.</h2></div>
  <div class="loading"><h2>.</h2></div>
  <div class="loading"><h2>.</h2></div>
  <div class="loading"><h2>.</h2></div>
  <div class="loading"><h2>C</h2></div>
  <div class="loading"><h2>I</h2></div>
  <div class="loading"><h2>N</h2></div>
  <div class="loading"><h2>A</h2></div>
  <div class="loading"><h2>H</h2></div>
  <div class="loading"><h2>C</h2></div>
  <div class="loading"><h2>E</h2></div>
  <div class="loading"><h2>M</h2></div>
  <div class="loading"><h2>N</h2></div>
  <div class="loading"><h2>G</h2></div>
  <div class="loading"><h2>I</h2></div>
  <div class="loading"><h2>S</h2></div>
  <div class="loading"><h2>E</h2></div>
  <div class="loading"><h2>D</h2></div>
 </div>
</div>
              
            
!

CSS

              
                @import "compass/css3";

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  padding: 50px;
  box-sizing: border-box;
  background: radial-gradient(hsl(0, 15%, 100%), hsl(200, 15%, 6%));
  background-color: rgba(240, 240, 240, 0.55);
  height: 1000vh;
  width: 90vw;
  overflow: hidden;
  border-radius: 100%;
}

.loader-align {
  position: absolute;
  z-index: 1001;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background-clip: border-box;
  clear: both;
  border-radius: 50%;
  box-shadow: inset 0 6vh 1vh 3vh rgba(255, 255, 255, 0.3),
    inset 0 -2vh 2vh 2vh rgba(0, 0, 0, 0.15), 0 4vh 4vh 0px rgba(0, 0, 0, 0.5);
}

.loader {
  width: 60vh !important;
  transition: all ease-in-out 0.75s;
  height: 60vh;
  border-radius: 50%;
  border: 2vh solid black;
  background-color: rgba(255, 240, 205, 0.1);
  border-color: rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  margin: auto;
  background-clip: border-box;
  clear: both;
  box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -0.75vh 2vh 1vh rgba(0, 0, 0, 0.15), 0 1vh 1.25vh rgba(0, 0, 0, 0.3);

  div.loading {
    transition: all ease-in-out 0.75s;
    position: absolute;
    opacity: 0.25;
    left: -13.65vh;
    top: -25.5vh;
    border-radius: 50%;
    width: 26vh;
    height: 26vh; /* Caution, the container must have square ratio */
    border-radius: 50%;
    margin-top: 20%;
    background-clip: inherit;
    //border: solid 10px black;
    background-color: rgba(0, 0, 0, 0);
    border-color: rgba(0, 0, 0, 0.25);
    animation: rotate 3s infinite cubic-bezier(0.9, 0.3, 0.1, 0.7);
    transform: rotateZ(21.5deg);
    transform: translateZ(-0deg); /* Starts from the middle */
    transform-origin: 168% 168%;
    font-size: 10vh !important;
    &:nth-child(1) {
      animation-delay: -0s;
    }
    &:nth-child(2) {
      animation-delay: 0.12s;
    }
    &:nth-child(3) {
      animation-delay: 0.24s;
    }
    &:nth-child(4) {
      animation-delay: 0.36s;
    }
    &:nth-child(5) {
      animation-delay: 0.48s;
    }
    &:nth-child(6) {
      animation-delay: 0.6s;
    }
    &:nth-child(7) {
      animation-delay: 0.72s;
    }
    &:nth-child(8) {
      animation-delay: 0.84s;
    }
    &:nth-child(9) {
      animation-delay: 0.96s;
    }
    &:nth-child(10) {
      animation-delay: 1.08s;
    }
    &:nth-child(11) {
      animation-delay: 1.2s;
    }
    &:nth-child(12) {
      animation-delay: 1.32s;
    }
    &:nth-child(13) {
      animation-delay: 1.48s;
    }
    &:nth-child(14) {
      animation-delay: 1.56s;
    }
    &:nth-child(15) {
      animation-delay: 1.64s;
    }
    &:nth-child(16) {
      animation-delay: 1.72s;
    }
    &:nth-child(17) {
      animation-delay: 1.80s;
    }
    &:nth-child(18) {
      animation-delay: 1.88s;
    }
  }
}
.loader h2 {
  transform: rotateZ(-51deg);
  margin: auto;
  top: 25%;
  position: relative;
  left: 40%;
  font-size: 10vh;
  color: rgba(255, 255, 255, 0.1);
}
.loader:hover h2 {
  transform: rotateZ(-51deg);
  margin: auto;
  top: 25%;
  position: relative;
  left: 40%;
  font-size: 10vh;
  color: rgba(255, 255, 255, 0.75);
}

@keyframes rotate {
  to {
    transform: rotateZ(382deg);
  } /* If it starts with 50deg, a complete turn ends with 410deg */
}

.loader:hover div.loading {
  font-size: 5vh !important;
  transition: all ease-in-out 0.75s;
  cursor: pointer;
  position: absolute;
  opacity: 0.5;
  left: -0.5vh;
  top: -0.5vh;
  border-radius: 50%;
  width: 12vh;
  height: 12vh; /* Caution, the container must always have a square ratio */
  border-radius: 50%;
  margin: 10vh;
  background-clip: inherit;
  border: solid 0.15vh black;
  background-color: rgba(235, 245, 255, 0.125);
  border-color: rgba(32, 64, 64, 0.0125);
  animation: rotate  2.055s infinite cubic-bezier(0.7, 0.3, 0.3, 0.7);
  transform: rotateZ(22deg);
  transform: translateZ(-22deg); /* Starts from the middle */
  transform-origin: 168% 168%;
  &:nth-child(1) {
    animation-delay: 0s;
  }
  &:nth-child(2) {
    animation-delay: 0.12s;
  }
  &:nth-child(3) {
    animation-delay: 0.24s;
  }
  &:nth-child(4) {
    animation-delay: 0.36s;
  }
  &:nth-child(5) {
    animation-delay: 0.48s;
  }
  &:nth-child(6) {
    animation-delay: 0.6s;
  }
  &:nth-child(7) {
    animation-delay: 0.72s;
  }
  &:nth-child(8) {
    animation-delay: 0.84s;
  }
  &:nth-child(9) {
    animation-delay: 0.96s;
  }
  &:nth-child(10) {
    animation-delay: 1.08s;
  }
  &:nth-child(11) {
    animation-delay: 1.2s;
  }
  &:nth-child(12) {
    animation-delay: 1.32s;
  }
  &:nth-child(13) {
    animation-delay: 1.48s;
  }
    &:nth-child(14) {
      animation-delay: 1.56s;
    }
    &:nth-child(15) {
      animation-delay: 1.64s;
    }
    &:nth-child(16) {
      animation-delay: 1.72s;
    }
    &:nth-child(17) {
      animation-delay: 1.80s;
    }
    &:nth-child(18) {
      animation-delay: 1.88s;
    }
}

.loader:after,
.loader:before {
  content: "";
  position: absolute;
  box-sizing: inherit;
  width: inherit;
  height: inherit;
  border-radius: inherit;
  opacity: 1;
  border: inherit;
  transition: all ease-in-out 0.75s;
  box-shadow: inset 0 3vh 0.5vh 2vh rgba(255, 255, 255, 0.2),
    inset 0 -0.75vh 1vh 1vh rgba(0, 0, 0, 0.75),
    0 2vh 2.25vh rgba(255, 255, 255, 0.5);
  transition: all ease-in-out 0.75s;
}

.loader:after {
  width: 30vh !important;
  height: 30vh;
  border-radius: 50%;
  top: 15vh;
  left: 15vh;
  border: 0vh solid rgba(255, 255, 255, 0.5);
  background-color: rgba(0, 255, 200, 0.7);
  position: absolute;
  z-index: -1;
  transition: all ease-in-out 0.75s;
  box-shadow: 
    inset 0 0vh 2vh 3vh rgba(0, 0, 0, 0.15),
    inset 0 -0.75vh 2vh 1vh rgba(0, 0, 0, 0.25),
    0vh 1vh 15.25vh rgba(255, 255, 255, 0.1),
    inset 0.5vh -0.75vh 2vh 10vh rgba(0, 0, 20, 0.25),
    0vh 1.5vh 1vh rgba(0, 0, 20, 1),
    inset -0.5vh 0.75vh 4vh 5vh rgba(0, 0, 0, 1),
    inset 0.5vh -0.35vh 1vh 10vh rgba(0, 0, 0, 0.25),
    0vh 0.5vh 0.25vh rgba(0, 0, 20, 0.4), 
    0vh 0.5vh 0.5vh rgba(0, 0, 20, 0.8),
    0vh 0.5vh 2.5vh rgba(0, 0, 20, 0.4), 
    0vh -8vh 5.25vh rgba(0, 0, 20, 0.75);
  background-image: url("https://www.designmechanic.co.uk/wp-content/uploads/2021/05/aaaaaa-lower.jpg");
  background-position: -0.5vh -0.5vh;
  background-size: 30vh;
  transition: all ease-in-out 0.75s;
}

.loader-align:hover .loader:active {
  transition: all ease-in-out 0.75s;
  box-shadow: inset 0 0vh 10.5vh 4vh rgba(205, 255, 255, 0.5),
    inset 0 -0.75vh 2vh 1vh rgba(0, 0, 0, 0.1),
    0vh 8vh 15.25vh rgba(255, 255, 255, 0.1),
    inset 0.5vh -0.75vh 2vh 10vh rgba(0, 0, 0, 0.1),
    0vh 1.5vh 1vh rgba(0, 0, 0, 0.1),
    inset -0.5vh 0.75vh 4vh 5vh rgba(0, 0, 0, 0.1),
    inset 0.5vh -0.35vh 1vh 10vh rgba(0, 0, 0, 0.1),
    0vh 0.25vh 1vh rgba(0, 0, 0, 0.1), 
    0vh 0.5vh 1vh rgba(0, 0, 0, 0.1),
    0vh 0.75vh 1vh rgba(0, 0, 0, 0.1), 
    0vh -1vh 5.25vh rgba(255, 255, 255, 0.1);
  user-select: none;
  background-color: rgba(205, 255, 255, 0.5);
}

.loader-align .loader:hover {
  background-color: rgba(205, 255, 255, 0.5);
  box-shadow: 0 1vh 0.5vh 2vh rgba(255, 255, 255, 0.2),
    inset 0 -0.75vh 2vh 1vh rgba(0, 0, 0, 0.75),
    0.5 0.5vh 1.25vh rgba(128, 128, 255, 0.3);
  transition: all ease-in-out 0.75s;
  cursor:pointer;
}

.loader-align:hover .loader:after {
  background-color: rgba(205, 255, 255, 0.5);
  box-shadow: inset 0 3vh 10.5vh 12vh rgba(255, 255, 255, 0.2),
    inset 0 -0.75vh 2vh 110vh rgba(0, 0, 0, 0.75),
    0 2vh 12.25vh rgba(32, 128, 255, 0.3);

  background-image: url(https://www.designmechanic.co.uk/wp-content/uploads/2021/05/aaaaaa-lower.jpg);
  transition: all ease-in-out 0.75s;
    background-position: -1000vh -700vh;
  background-size: 2000vh;
}

.loader:before {
  width: 80vh !important;
  height: 80vh;
  border-radius: 50%;
  top: -10vh;
  left: -10vh;
  border: 2vh solid rgba(0, 0, 0, 0.0125);
  background-color: rgba(32, 32, 128, 0.5);
  position: absolute;
  z-index: -1;
  box-shadow: 0 4vh 4vh 0px rgba(255, 255, 255, 0.5),
    inset 0 3vh 0.5vh 2vh rgba(255, 255, 255, 0.1),
    inset 0 -0.75vh 2vh 1vh rgba(0, 0, 0, 0.75),
    0 2vh 2.25vh rgba(255, 128, 255, 0.1),
    inset -0.75vh 2vh 10vh rgba(0, 250, 0, 1);
  transition: all ease-in-out 0.75s;
}

.loader-align:hover .loader:before {
  width: 80vh !important;
  height: 80vh;
  border-radius: 50%;
  top: -10vh;
  left: -10vh;
  border: 2vh solid rgba(255, 255, 255, 0.25);
  background-color: rgba(0, 0, 64, 0.5);
  position: absolute;
  z-index: -1;
  box-shadow: 0 4vh 4vh 0px rgba(255, 255, 255, 0.1),
    0 3vh 0.5vh 2vh rgba(255, 255, 255, 0.1),
    0 -0.75vh 2vh 1vh rgba(0, 0, 0, 0.75), 0 2vh 2.25vh rgba(255, 255, 255, 0.1),
    18px 88px 300px 0px rgba(205, 246, 252, 1),
    inset 0px 88px 300px 0px rgba(205, 246, 252, 1);
  background-color: rgba(96, 128, 128, 0.5);
  transition: all ease-in-out 0.75s;
}

.loader-align .loader:before {
  box-shadow: 0 4vh 4vh 0px rgba(255, 255, 255, 0.1),
    0 3vh 0.5vh 2vh rgba(255, 255, 255, 0.1),
    0 -0.75vh 2vh 1vh rgba(0, 0, 0, 0.75), 0 2vh 2.25vh rgba(128, 128, 255, 0.1),
    18px 88px 300px 0px rgba(205, 246, 252, 0.1);
  background-color: rgba(0, 0, 64, 0.5);
  transition: all ease-in-out 0.75s;
}

.loader div.loading,
.loader:hover div.loading,
.loader:hover div.loading h2 {
  transition: all ease-in-out 0.75s;
  font-size: 5vh !important;
  animation-delay: 0.72s;
}

.loader div.loading h2 {
  transition: all ease-in-out 0.75s;
  font-size: 12vh !important;

}
// Page ----------------------------------

              
            
!

JS

              
                // pen by Martyn Knapton ( https://www.designmechanic.co.uk )
              
            
!
999px

Console