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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 class="loading">
  <div class="load">
    
  </div>
  <h2 class="loading__h2">Loading...</h2>
</div>

<div class="h2">Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint omnis quasi in repellendus tempore sunt ducimus voluptatibus dicta animi mollitia asperiores iusto, consequatur repudiandae eligendi reprehenderit sed voluptatum quibusdam voluptate!</div>
<br><br>
<div class="h2">Possimus amet debitis ut consectetur fuga ab omnis. Laudantium qui provident, iusto accusantium sapiente quam aut eveniet consequuntur itaque! Quas praesentium ad in maxime nulla eligendi a rem, sit deserunt!</div><br><hr><br>
<div class="h2">Quo voluptatibus atque, obcaecati placeat explicabo deserunt voluptates dicta libero eveniet? Molestiae, consequatur impedit deleniti explicabo voluptatibus accusamus pariatur doloribus excepturi ab voluptas consectetur. Illum exercitationem voluptates nemo et nihil?</div><br><hr><br>
<div class="h2">Maxime nisi dolore cumque neque adipisci autem earum debitis, fugit laudantium fugiat in nihil, labore vel impedit, distinctio repellendus sint. Quis ut amet eligendi hic alias assumenda temporibus quaerat deleniti?</div>
<div class="h2">Accusantium aperiam cumque amet! Laudantium ipsam minus eaque similique totam inventore, voluptatem possimus, officiis at consequatur dignissimos fuga non in earum voluptates debitis a dicta repudiandae! Reiciendis est nam ut!</div>
              
            
!

CSS

              
                .loading{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #555555;
  &__h2{
    position: absolute;
    text-align: center;
    color: #777777;
    font-weight: 100;
    top: 58%;
    left: 50%;
    transform: translateX(-50%);
  }
}

.load{
  position: absolute;
  top: 50%;
  left: 50%;
  height: 50px;
  width: 50px;
  background: #777;
  border-radius: 25px;
  animation: load 3s linear infinite;
  
  &::before{
    content: '';
    height: 44px;
    width: 44px;
    position: absolute;
    background: #555;
    top: 3px;
    left: 3px;
    border-radius: 20px;
  }
  &::after{
    content: '';
    height: 10px;
    width: 60px;
    background: #555;
    position: absolute;
    padding: 0;
    margin: 0;
    line-height: 44px;
    color: #555;
    font-size: 110px;
    font-weight: bold;    
    top: 20px;
    left: -7px;
  }
}
@keyframes load{
  0%{
    transform: translate(-50%, -50%) rotate(0);
  }
  100%{
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.hiddenScroll{
  overflow: hidden;
}
              
            
!

JS

              
                var delayTimer = 5000;
var fadeOutTimer = 300;

$('.loading').delay(delayTimer).fadeOut(fadeOutTimer);
$('body').toggleClass('hiddenScroll');
var removeScroll = function(){
  $('body').removeClass('hiddenScroll');  
};
setTimeout(removeScroll, delayTimer);

              
            
!
999px

Console