123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <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>
            
          
!
            
              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)
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console