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 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

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

              
                <div id="wrapper" class="loader">
  <h1>smiley face loader will remove itself after 3 seconds simulating load time</h1>
  <div id="wrapper-inner">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam porttitor consectetur leo quis euismod. Mauris vulputate neque at ex tempor, ut fringilla mauris sagittis. Phasellus venenatis mi ut nulla tincidunt pulvinar. Pellentesque a ex et dolor
      aliquet consequat eget at mauris. Integer dolor ipsum, convallis quis magna sit amet, laoreet rhoncus nisl. Fusce commodo, arcu at tempus scelerisque, enim libero dignissim eros, sed sollicitudin velit metus et arcu. Proin quis egestas arcu, vitae
      rhoncus eros. Nunc bibendum semper lorem, in tincidunt felis.
      <br>
      <br> Morbi egestas nunc vel facilisis eleifend. Morbi sodales, massa sed iaculis ultricies, est elit malesuada lorem, ac scelerisque risus elit ut elit. Donec rutrum mattis sapien a feugiat. Nulla et libero in nisi dignissim tempor. Morbi dictum, mi
      quis tincidunt tempor, tortor mi egestas enim, et ullamcorper tortor est varius ante. Cras quis augue massa. Morbi ut turpis ultrices, aliquet magna ut, dignissim augue.
      <br>
      <br> Ut tempus tortor ut est pharetra sodales. In a cursus lectus, at tempor sem. Integer eu ligula at mi tristique ultricies ac et diam. Pellentesque gravida purus ligula, ac euismod massa accumsan vitae. Pellentesque aliquam lacus in tellus consectetur
      convallis. Nullam consectetur consectetur ligula, ut egestas turpis. Mauris finibus rhoncus erat, vel vehicula tortor feugiat nec. Proin ac nulla non nulla consequat fringilla. Quisque ac arcu semper, euismod quam at, malesuada lectus.
    <br><br>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam porttitor consectetur leo quis euismod. Mauris vulputate neque at ex tempor, ut fringilla mauris sagittis. Phasellus venenatis mi ut nulla tincidunt pulvinar. Pellentesque a ex et dolor
      aliquet consequat eget at mauris. Integer dolor ipsum, convallis quis magna sit amet, laoreet rhoncus nisl. Fusce commodo, arcu at tempus scelerisque, enim libero dignissim eros, sed sollicitudin velit metus et arcu. Proin quis egestas arcu, vitae
      rhoncus eros. Nunc bibendum semper lorem, in tincidunt felis.
      <br>
      <br> Morbi egestas nunc vel facilisis eleifend. Morbi sodales, massa sed iaculis ultricies, est elit malesuada lorem, ac scelerisque risus elit ut elit. Donec rutrum mattis sapien a feugiat. Nulla et libero in nisi dignissim tempor. Morbi dictum, mi
      quis tincidunt tempor, tortor mi egestas enim, et ullamcorper tortor est varius ante. Cras quis augue massa. Morbi ut turpis ultrices, aliquet magna ut, dignissim augue.
      <br>
      <br> Ut tempus tortor ut est pharetra sodales. In a cursus lectus, at tempor sem. Integer eu ligula at mi tristique ultricies ac et diam. Pellentesque gravida purus ligula, ac euismod massa accumsan vitae. Pellentesque aliquam lacus in tellus consectetur
      convallis. Nullam consectetur consectetur ligula, ut egestas turpis. Mauris finibus rhoncus erat, vel vehicula tortor feugiat nec. Proin ac nulla non nulla consequat fringilla. Quisque ac arcu semper, euismod quam at, malesuada lectus.</p>
  </div>
</div>
              
            
!

CSS

              
                html{
  height:100%;
}

body{
  height:100%;
  background:#666;
  overflow:hidden;
  font-size:14px;
}

h1 {
  font-weight:bold;
}

#wrapper{
  width:100%;
  height:100%; 
  text-align:center;
  color:#FFF;
}

#wrapper.loader {
  background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/56901/smiley.gif") no-repeat 50% 46% transparent;
}

#wrapper-inner{
  font-size:20px;
  text-align:left;
  visibility:hidden;
}

              
            
!

JS

              
                // wait until DOM is ready
$( document ).ready(function() {
   
    // wait until images, links, style-sheets, and other assets are loaded
    $( window ).load(function() { 
       
       // remove loader class
       // I use tweenmax delayedCall() instead of setTimout()
       // just so you can see the loader and see it removed
       // do not use for production 
       TweenMax.delayedCall(3, function(){
           $("#wrapper").removeClass("loader");
         
           TweenMax.to("#wrapper-inner",2,{autoAlpha:1})         
       });
      
       // your tweens
       

    });

});
              
            
!
999px

Console