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

              
                

<div class="content">
  <div class="loader loader--active">    
  </div>
  loading content here
</div>  
              
            
!

CSS

              
                body, html, .loader
  height: 100%
  width: 100%


.loader__graphic--dots,
.loader__text
  display: none

.loader
  background: rgb(235, 238, 240)
  position: fixed
  top: 0
  left: 0

.loader::before
  content: ("")
  width: 100%
  height: 4px
  background: #479ccf
  position: fixed
  top: 0
  left: 0
  z-index: 100
  transform: scaleX(0)
  transform-origin: 0 0
  transition: transform 1s ease-out

.loader--active::before
  animation: load-step 20s infinite
  transition: transform 1s ease-out
  
@keyframes load-step
  0%
    transform: scaleX(0)
  8%
    transform: scaleX(0.1)
  10%
    transform: scaleX(0.1)
  18%
    transform: scaleX(0.2)
  20%
    transform: scaleX(0.2)
  28%
    transform: scaleX(0.3)
  30%
    transform: scaleX(0.3)
  100%
    transform: scaleX(0.3)

.loader--complete::before
  transform: scaleX(1.0)!important
  transition: all 2s ease-out
  
.content
  width: 90%
  max-width: 450px
  height: 300px
  margin: 0 auto
  position: relative
  top: 50%
  transform: translateY(-50%)
  background: white
  z-index: 2
  border-radius: 4px
  box-shadow: 0 2px 4px rgba(0,0,0,0.1)
  font-size: 15px
  font-weight: bold
  color: rgb(220, 221, 222)
  text-transform: uppercase
  text-align: center
  box-sizing: border-box
  padding: 15px

              
            
!

JS

              
                window.setTimeout(completeLoading, 5500)


function completeLoading(){
  $('.loader').addClass('loader--complete').removeClass('loader--active');
}
              
            
!
999px

Console