Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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 Pure css loader #3
h2 Inspired by Lukáš Straňák (via 
  a(href="https://dribbble.com/shots/2440492-App-loader", target="blank") dribble
  |)

ul.loader
  -for (var x = 1; x < 6; x++)
    li(class="item-" + x)
              
            
!

CSS

              
                $background-color: hsl(0, 0, 15)

body
  background: $background-color
  font-family: sans-serif
h1, h2
  position: absolute
  left: 50%
  transform: translateX(-50%)
  color: hsl(0, 0, 100)
  text-transform: uppercase
  letter-spacing: 2px
h1
  top: 24px
  font-size: 12px
h2
  top: 44px
  font-size: 10px
  opacity: 0.7
  a
    color: hsl(0, 0, 100)
    text-decoration: none
    border-bottom: 1px dotted lighten($background-color, 50%)
  
    
    
// Loader vars
$loader-time: 1.4s
$item-size: 14px
$item-delay: 0s
    
.loader
  position: absolute
  height: 10px
  top: 50%
  left: 50%
  transform: translate(-50%, -50%)
@for $i from 1 through 5
  $item-delay: $item-delay + 0.1
  .item-#{$i}
    float: left
    width: $item-size
    margin: 0 ($item-size /3)
    border-radius: $item-size /2
    animation: anim $loader-time ease-in-out infinite $item-delay
    animation-fill-mode: backwards
    
@keyframes anim
  0%, 15%, 85%, 100%
    height: $item-size
    background: hsl(0, 0, 100)
    transform: translateY(0)
  30%, 70%
    height: $item-size *3
  41%, 59%
    height: $item-size
    background: hsl(300, 100, 30)
    transform: translateY(-$item-size*7)
  
    
              
            
!

JS

              
                
              
            
!
999px

Console