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.


                <div id="site-loader" class="loader">
	<div class="loader-wrapper">
		<p class="loader-text">0%</p>
		<div class="loader-bar">
			<span class="loader-progress">
	<div class="loader-overlay u-absolute u-pos-tl u-fit"></div>

<div id="intro" class="hero">
  <img src="">
  <img class="js-img-load" src=",format&fit=crop&w=1199&h=799&q=80&cs=tinysrgb&crop=">
  <img class="js-img-load" src=",format&fit=crop&w=1199&h=799&q=80&cs=tinysrgb&crop=">
  <img class="js-img-load" src=",format&fit=crop&w=1199&h=799&q=80&cs=tinysrgb&crop=">
  <img class="js-img-load" src=",format&fit=crop&w=1199&h=794&q=80&cs=tinysrgb&crop=">
  <img class="js-img-load" src=",format&fit=crop&w=1199&h=799&q=80&cs=tinysrgb&crop=">
  <img class="js-img-load" src=",format&fit=crop&w=1199&h=673&q=80&cs=tinysrgb&crop=">



                .loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-transition: opacity .6s cubic-bezier(.165,.84,.44,1) .2s;
    transition: opacity .6s cubic-bezier(.165,.84,.44,1) .2s;

.loader-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 1;
    z-index: 1;
    -webkit-transform: translate(-50%,-50%);
    transform: translate(-50%,-50%);
    -webkit-transition: opacity .4s cubic-bezier(.25,.46,.45,.94);
    transition: opacity .4s cubic-bezier(.25,.46,.45,.94);

.loader-text {
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    text-align: center;
    color: black;
    font-size: .8333333333rem;
    letter-spacing: .3em;
    text-transform: uppercase;

.loader-bar {
    margin-top: 18px;
    width: 95%;
    background-color: #ccc;
    height: 1px;

.loader-progress {
    height: 100%;
    width: 100%;
    display: block;
    background-color: black;
    -webkit-transform-origin: left center;
    transform-origin: left center;
    -webkit-transition: -webkit-transform .4s cubic-bezier(.19,1,.22,1);
    transition: -webkit-transform .4s cubic-bezier(.19,1,.22,1);
    transition: transform .4s cubic-bezier(.19,1,.22,1);
    transition: transform .4s cubic-bezier(.19,1,.22,1),-webkit-transform .4s cubic-bezier(.19,1,.22,1);




                        // number of loaded images for preloader progress
        var loadedCount = 0; //current number of images loaded
        var imagesToLoad = $('.js-img-load').length; //number of slides with .bcg container
        var loadingProgress = 0; //timeline progress - starts at 0
        }).progress( function( instance, image ) {
        function loadProgress(imgLoad, image)
            //one more image has been loaded
            loadingProgress = (loadedCount/imagesToLoad);
            // GSAP tween of our progress bar timeline
  , 0.7, {progress:loadingProgress, ease:Linear.easeNone});

        //progress timeline
        var progressTl = new TimelineMax({
            paused: true,
            onUpdate: progressUpdate,
            onComplete: loadComplete
            //tween the progress bar width
            .to($('.loader-progress span'), 1, {width:100, ease:Linear.easeNone});
        //as the progress bar width updates and grows we put the percentage loaded in the screen
        function progressUpdate()
            //the percentage loaded based on the tween's progress
            loadingProgress = Math.round(progressTl.progress() * 100);
            //we put the percentage in the screen
            $(".loader-text").text(loadingProgress + '%');

        function loadComplete() {
          // preloader out
          var preloaderOutTl = new TimelineMax();
            .to($('.loader-wrapper'), 0.3, {autoAlpha: 0, ease:Back.easeInOut})
            .set($('body'), {className: '-=is-loading'})
            .set($('html'), {className: '+=is-intro-leave'})
            .set($('#intro'), {className: '+=is-loaded'})
            .to($('#site-loader'), 0.8, {yPercent: 100, ease:Power4.easeInOut})
            .set($('#site-loader'), {className: '+=is-hidden'});
          return preloaderOutTl;