Pen Settings



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


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


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.


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.


1. You need to add this div anywhere inside the body tag of your site:
<div id="preloader"></div>

2. If your site doesn't already use jquery, add this script tag inside the head of your site:

<script src=""></script>

<h1>Super Simple Full-Page Preloader</h1>
<p>Did you see the preloader? if not, re-load and watch the center of the screen below.  You should see a pac-man animation until the site loads (which will be quick because there's not much to load).</p>

<p>This preloader was created to be as easy to impliment as possible, it should work on any site regardless of what CMS or libraries you are using.</p>

<p>Since writing this code it's been viewed around 300,000 times on codepen!  I'm celebrating this milestone by re-writing the code and comments to make it even easier to use!</p>

<p>If you didn't see the preloader, add more content (big images) so the page takes longer to load</p>

<p>If you use this code on your site, please consider supporting us with a BTC tip to this address:</p>


                /* add this css to your stylesheet or add it within a style tag in the head of your document */

.js div#preloader {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  width: 100%;
  height: 100%;
  overflow: visible;
  /* You can change the background color and image URL here.  This solution works with animated .svg and animated .gif */
  background: #ffffff url('') no-repeat center center;


                // add the javascript below to the head of your doc inside a script tag

// this line adds a class of js to your html element, we add the class with javascript instead of just putting it in the html so if javascript isn't available, the preloader does not show up, because without javascript it won't fade out and would just be there forever.

// dom is loaded
jQuery(document).ready(function($) {  

// fade out preloader