cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              .container
  .loader
    .loader--dot
    .loader--dot
    .loader--dot
    .loader--dot
    .loader--dot
    .loader--dot
    .loader--text
    
            
          
!
            
              $loader--width: 250px
$loader-dot--size: 20px

.container
  height: 100vh
  width: 100vw
  font-family: Helvetica

.loader
  height: $loader-dot--size
  width: $loader--width
  position: absolute
  top: 0
  bottom: 0
  left: 0
  right: 0
  margin: auto
  
  &--dot
    animation:
      name: loader
      timing-function: ease-in-out
      duration: 3s
      iteration-count: infinite
    height: $loader-dot--size 
    width: $loader-dot--size 
    border-radius: 100%
    background-color: black
    position: absolute
    border: 2px solid white
    
    &:first-child
      background-color: #8cc759
      animation-delay: 0.5s
    
    &:nth-child(2)
      background-color: #8c6daf
      animation-delay: 0.4s
    
    &:nth-child(3)
      background-color: #ef5d74
      animation-delay: 0.3s
    
    &:nth-child(4)
      background-color: #f9a74b
      animation-delay: 0.2s
    
    &:nth-child(5)
      background-color: #60beeb
      animation-delay: 0.1s
    
    &:nth-child(6)
      background-color: #fbef5a
      animation-delay: 0s
  
  &--text
    position: absolute
    top: 200%
    left: 0
    right: 0
    width: 4rem
    margin: auto

    &:after
      content: "Loading"      
      font-weight: bold
      animation:
        name: loading-text
        duration: 3s
        iteration-count: infinite
    
@keyframes loader
  15%
    transform: translateX(0)
  
  45%
    transform: translateX( $loader--width - $loader-dot--size )

  65%
    transform: translateX( $loader--width - $loader-dot--size )
  
  95%
    transform: translateX(0)

@keyframes loading-text
  0%
    content: "Loading"
  
  25%
    content: "Loading."
  
  50%
    content: "Loading.."
  
  75%
    content: "Loading..."
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console