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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css" />
<h1>Single element loaders</h1>
<h2>CSS (SASS) ONLY</h2>

<div class="spinners">
  <div class="row">
    <div class="spinner spinner-bounce-bottom"></div>
  </div>
  <div class="row">
    <div class="spinner spinner-bounce-top"></div>
  </div>
  <div class="row">
    <div class="spinner spinner-bounce-middle"></div>
  </div>
  <div class="row">
    <div class="spinner spinner-blink"></div>
  </div>
</div>
              
            
!

CSS

              
                body
  background-color: white
  font-family: 'Lato', Arial, sans-serif
  text-align: center
  padding-top: 50px
  
h1
  font-size: 1.5em
  color: #666
  
h2, a
  font-size: 0.8em
  color: #00B285
  
.spinners
  margin: 60px auto
  .row
    height: 50px
    padding: 10px 0
    

/* ============================ */
/* VARIABLES                    */
/* ============================ */
  
$bar-width: 4px
$bar-height: 20px
$bar-color: #00B285
$bar-radius: 2px
    
/* ============================ */
/* SPINNER GENERAL              */
/* ============================ */

%bar
  width: $bar-width
  height: $bar-height
  background-color: $bar-color
  border-radius: $bar-radius

.spinner
  display: inline-block
  position: relative
  @extend %bar
  &:before,
  &:after
    content: ""
    position: absolute
    display: block
    @extend %bar
    top: 0px
  &:before
    left: -1 * ($bar-width + $bar-width/2)
  &:after
    left: $bar-width + $bar-width/2

/* ============================ */
/* SPINNER BOUNCE BOTTOM        */
/* ============================ */
  
@keyframes bounce-bottom
  0%
    height: 5px
    margin-top: $bar-height - 5px
  50%
    height: $bar-height
    margin-top: 0px
  100%
    height: 5px
    margin-top: $bar-height - 5px
    
@mixin bounce-bottom($dur: 0.5s, $delay: 0s)
  animation: bounce-bottom $dur ease $delay infinite
    
.spinner-bounce-bottom
  @include bounce-bottom(0.6s, 0.1s)
  &:before,
  &:after
    top: auto
    bottom: 0px
  &:before
    @include bounce-bottom(0.6s, 0s)
  &:after
    @include bounce-bottom(0.6s, 0.2s)  
  
/* ============================ */
/* SPINNER BOUNCE TOP        */
/* ============================ */

@keyframes bounce-top
  0%
    height: 5px
    margin-bottom: $bar-height - 5px
  50%
    height: $bar-height
    margin-bottom: 0px
  100%
    height: 5px
    margin-bottom: $bar-height - 5px
    
@mixin bounce-top($dur: 0.5s, $delay: 0s)
  animation: bounce-top $dur ease $delay infinite
    
.spinner-bounce-top
  @include bounce-top(0.6s, 0.1s)
  &:before
    @include bounce-top(0.6s, 0s)
  &:after
    @include bounce-top(0.6s, 0.2s)  

/* ============================ */
/* SPINNER BOUNCE MIDDLE        */
/* ============================ */

@keyframes bounce-middle
  0%
    height: 4px
    margin-top: $bar-height / 2 - 2px
    margin-bottom: $bar-height / 2 - 2px
  50%
    height: $bar-height
    margin-top: 0px
    margin-bottom: 0px
  100%
    height: 4px
    margin-top: $bar-height / 2 - 2px
    margin-bottom: $bar-height / 2 - 2px
    
@mixin bounce-middle($dur: 0.5s, $delay: 0s)
  animation: bounce-middle $dur ease $delay infinite
    
.spinner-bounce-middle
  @include bounce-middle(0.6s, 0.1s)
  &:before,
  &:after
    top: 50%
    transform: translateY(-1 * $bar-height / 2) translateZ(0)
  &:before
    @include bounce-middle(0.6s, 0s)
  &:after
    @include bounce-middle(0.6s, 0.2s)  
    
/* ============================ */
/* SPINNER BLINK                */
/* ============================ */

@keyframes glow
  0%
    background-color: transparent
  50%
    background-color: $bar-color
  100%
    background-color: transparent

@mixin glow($dur: 0.5s, $delay: 0s)
  animation: glow $dur $delay infinite
    
.spinner-blink
  @include glow(0.6s, 0.1s)
  &:before
    @include glow(0.6s, 0s)
  &:after
    @include glow(0.6s, 0.2s)
              
            
!

JS

              
                
              
            
!
999px

Console