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

              
                <h1>Neon Loaders</h1>

<div class="loader1">
<div></div>
<div></div>
<div></div>
</div>

<div class="loader2">
  <div></div>
</div>

<div class="loader3">
<div></div>
<div></div>
<div></div>
</div>


<div class="loader4">
  <div>Loading</div>
</div>

<div class="loader5">
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>  
</div>
              
            
!

CSS

              
                @import "compass/css3";

$color-list: #ec0aac, #7f43d7, #0d8fdb;

html {
  background-color: rgb(0,0,0);
  @include filter-gradient(#000000, #2d2f33, horizontal);
  @include background-image(radial-gradient(center, ellipse cover,  rgba(0,0,0,1) 0%,rgba(45,47,51,1) 100%));
}

h1 {
animation: 3s text-color infinite linear alternate; 
  font-family: 'Press Start 2P', cursive;
  font-size: 2.5rem;
  margin-top: 2.5rem;
text-align: center;  
}

::selection {
 background:  nth($color-list, 1);
  color: #fff;
}

::-moz-selection {
 background:  nth($color-list, 1);
  color: #fff;
}

[class*="loader"] {
    height: 4em;
  margin: 4em auto;
  width: 15em;
}

.loader1 {

  div {
    animation: 3s fade infinite ease-in-out;
    animation-fill-mode: backwards;
    border-radius: 50%;
    height: 3em;
    float: left;
    margin: 1em;
    opacity: 1;
    width: 3em;
    
    @for $i from 1 through 3 {
      &:nth-child(#{$i}) {
        animation-delay: (0.5s * $i); 
        background: nth($color-list, $i);
        box-shadow: 0 0 1em rgba(nth($color-list, $i), 0.8), 0 0 1.8em rgba(nth($color-list, $i), 0.6), inset 0 0 0.2em darken(nth($color-list, $i), 30%);     
      }  
    }  
  }
}

.loader2 {
  background: #45484d;
  height: 2em;
  position: relative;
    
  div {
    animation: 5s slide infinite;
   background: red;
    height: 2em;
    left: 0;
    position: absolute;
    width: 0;
  }

}


.loader3 {
 background: #45484d; 
@include filter-gradient(#45484d, #45484d, horizontal);
@include background-image(linear-gradient(left,  #45484d 33%,#000000 33%,#45484d 34%,#45484d 65%,#000000 66%,#45484d 67%));
  height: 3em;
  
  div {
    animation: 3s fade infinite ease-in-out;
    animation-fill-mode: backwards;
    height: 3em;
    float: left;
    opacity: 1;
    width: 5em;
    
    @for $i from 1 through 3 {
      &:nth-child(#{$i}) {
        animation-delay: (0.5s * $i); 
        background: nth($color-list, $i);
        box-shadow: 0 0 1em rgba(nth($color-list, $i), 0.8), 0 0 1.8em rgba(nth($color-list, $i), 0.6), inset 0 0 0.2em darken(nth($color-list, $i), 30%);     
      }  
    }  
  }
}


.loader4 {
  animation: 3s background-move linear infinite alternate;
@include background-image(linear-gradient(left,  nth($color-list,1) 0%,nth($color-list,2) 33%,nth($color-list,3) 66%,nth($color-list,1) 100%)); 
  background-size: 300%;
  height: 3rem;
  position: relative;
  div {
    animation: 3s text-color infinite linear alternate;
      background-color: rgb(0,0,0);
  @include filter-gradient(#000000, #2d2f33, horizontal);
  @include background-image(radial-gradient(center, ellipse cover,  rgba(0,0,0,1) 0%,rgba(45,47,51,1) 100%));
    color: nth($color-list,1); 
  font-size: 1.5rem;
    height: 2.8rem;
    left: 0.15rem;
    line-height: 2;
    position: absolute;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 0 1em rgba(nth($color-list, 1), 0.8);
    top: 0.1rem;
    width: 14.75rem;
  }
}


.loader5 {
  background: #45484d;
  height: 3em;
  position: relative;
    
  div {
    animation: 3s slide linear infinite alternate;
   background: red;
    height: 0.5em;
    left: 0;
    position: absolute;
    width: 0;
    &:nth-child(2) {
      animation-delay: 0.5s;
     top: 0.5em; 
    }
     &:nth-child(3) {
      animation-delay: 1s;
     top: 1em; 
    }
    &:nth-child(4) {
      animation-delay: 1.5s;
     top: 1.5em; 
    }
     &:nth-child(5) {
      animation-delay: 2s;
     top: 2em; 
    } 
     &:nth-child(6) {
      animation-delay: 2.5s;
     top: 2.5em; 
    } 
    
  }

}


@keyframes background-move {
 0% {
   background-position: left center;
    box-shadow: 0 0 1em rgba(nth($color-list, 1), 0.8);
  }
  
  33% {
        box-shadow: 0 0 1em rgba(nth($color-list, 2), 0.8);
  }
  
  66% {
        box-shadow: 0 0 1em rgba(nth($color-list, 3), 0.8);
  }
  
 100% {
   background-position: right center; 
    box-shadow: 0 0 1em rgba(nth($color-list, 1), 0.8);
  }  
}

@keyframes text-color {
 0% {
    color: nth($color-list,1);
    text-shadow: 0 0 1em rgba(nth($color-list, 1), 0.8);
  }
   50% {
    color: nth($color-list,2); 
    text-shadow: 0 0 1em rgba(nth($color-list, 2), 0.8);
  }
   100% {
    color: nth($color-list,3);
    text-shadow: 0 0 1em rgba(nth($color-list, 3), 0.8);
  }
  
}


@keyframes slide {
 0% {
    background: nth($color-list, 1);
    box-shadow: 0 0 1em rgba(nth($color-list, 1), 0.8), 0 0 1.8em rgba(nth($color-list, 1), 0.6), inset 0 0 0.2em darken(nth($color-list, 1), 30%);
   width: 0;
  }
 
  50% {
    background: nth($color-list, 2);
    box-shadow: 0 0 1em rgba(nth($color-list, 2), 0.8), 0 0 1.8em rgba(nth($color-list, 2), 0.6), inset 0 0 0.2em darken(nth($color-list, 2), 30%);
  }
  
 100% {
    background: nth($color-list, 3);
    box-shadow: 0 0 1em rgba(nth($color-list, 3), 0.8), 0 0 1.8em rgba(nth($color-list, 3), 0.6), inset 0 0 0.2em darken(nth($color-list, 3), 30%);
   width: 15em; 
  }  
}

@keyframes fade {
  0%, 100% { 
    opacity: 0;
  }
  
  50% {
    opacity: 1
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console