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="wrapper">
    
    <div class="block animatable bounceIn">bounceIn</div>
    <div class="block animatable bounceInLeft">bounceInLeft</div>
    <div class="block animatable bounceInRight">bounceInRight</div>
    
    <div class="block animatable fadeIn">fadeIn</div>
    <div class="block animatable fadeInDown">fadeInDown</div>
    <div class="block animatable fadeInUp">fadeInUp</div>
    
    <div class="block animatable moveUp">moveUp</div>
    
    <div class="block animatable fadeBgColor">fadeBgColor</div>
    
    
    
    
    <div class="block animatable bounceIn">bounceIn</div>
    <div class="block animatable bounceInLeft">bounceInLeft</div>
    <div class="block animatable bounceInRight">bounceInRight</div>
    
    <div class="block animatable fadeIn">fadeIn</div>
    <div class="block animatable fadeInDown">fadeInDown</div>
    <div class="block animatable fadeInUp">fadeInUp</div>
    
    <div class="block animatable moveUp">moveUp</div>
    
    <div class="block animatable fadeBgColor">fadeBgColor</div>
    
    
    
    
    <div class="block animatable bounceIn">bounceIn</div>
    <div class="block animatable bounceInLeft">bounceInLeft</div>
    <div class="block animatable bounceInRight">bounceInRight</div>
    
    <div class="block animatable fadeIn">fadeIn</div>
    <div class="block animatable fadeInDown">fadeInDown</div>
    <div class="block animatable fadeInUp">fadeInUp</div>
    
    <div class="block animatable moveUp">moveUp</div>
    
    <div class="block animatable fadeBgColor">fadeBgColor</div>
    
    
    
    
    <div class="block animatable bounceIn">bounceIn</div>
    <div class="block animatable bounceInLeft">bounceInLeft</div>
    <div class="block animatable bounceInRight">bounceInRight</div>
    
    <div class="block animatable fadeIn">fadeIn</div>
    <div class="block animatable fadeInDown">fadeInDown</div>
    <div class="block animatable fadeInUp">fadeInUp</div>
    
    <div class="block animatable moveUp">moveUp</div>
    
    <div class="block animatable fadeBgColor">fadeBgColor</div>
    
    
    
    
    <div class="block animatable bounceIn">bounceIn</div>
    <div class="block animatable bounceInLeft">bounceInLeft</div>
    <div class="block animatable bounceInRight">bounceInRight</div>
    
    <div class="block animatable fadeIn">fadeIn</div>
    <div class="block animatable fadeInDown">fadeInDown</div>
    <div class="block animatable fadeInUp">fadeInUp</div>
    
    <div class="block animatable moveUp">moveUp</div>
    
    <div class="block animatable fadeBgColor">fadeBgColor</div>
    
    
    
    
    <div class="block animatable bounceIn">bounceIn</div>
    <div class="block animatable bounceInLeft">bounceInLeft</div>
    <div class="block animatable bounceInRight">bounceInRight</div>
    
    <div class="block animatable fadeIn">fadeIn</div>
    <div class="block animatable fadeInDown">fadeInDown</div>
    <div class="block animatable fadeInUp">fadeInUp</div>
    
    <div class="block animatable moveUp">moveUp</div>
    
    <div class="block animatable fadeBgColor">fadeBgColor</div>
    
  </div>
              
            
!

CSS

              
                body {
  background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEX4+Pj09PQf/c7fAAAAGklEQVR4Xq3MIQEAAADDIPqX/kvMIMEWEm8O7b0/wewc/NcAAAAASUVORK5CYII=) repeat;
}

.block {
  height: 5em;
  line-height: 5em;
  width: 10em;
  background: #464646;
  color: #fdfdfd;
  text-align: center;
  margin: 1em auto;
  text-shadow: 0 0 1px #333; /* so one can see fadeBgColor properly */
}

.animatable {
  /* initially hide animatable objects */
  visibility: hidden;

  /* initially pause animatable objects their animations */
  animation-play-state: paused;
}

/* show objects being animated */
.animated {
  visibility: visible;

  animation-fill-mode: both;
  animation-duration: 1s;
  animation-play-state: running;
}

/* CSS Animations (extracted from http://glifo.uiparade.com/) */
@keyframes fadeIn {
  0%,
  60% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceInLeft {
  0% {
    opacity: 0;
    transform: translateX(-2000px);
  }
  60% {
    transform: translateX(20px);
  }
  80% {
    transform: translateX(-5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceInRight {
  0% {
    opacity: 0;
    transform: translateX(2000px);
  }
  60% {
    transform: translateX(-20px);
  }
  80% {
    transform: translateX(5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes moveUp {
  0% {
    transform: translateY(40px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes fadeBgColor {
  0%,
  70% {
    background: none;
  }
  100% {
    background: #464646;
  }
}

.animated.animationDelay {
  animation-delay: 0.4s;
}
.animated.animationDelayMed {
  animation-delay: 1.2s;
}
.animated.animationDelayLong {
  animation-delay: 1.6s;
}
.animated.fadeBgColor {
  animation-name: fadeBgColor;
}
.animated.bounceIn {
  animation-name: bounceIn;
}
.animated.bounceInRight {
  animation-name: bounceInRight;
}
.animated.bounceInLeft {
  animation-name: bounceInLeft;
}
.animated.fadeIn {
  animation-name: fadeIn;
}
.animated.fadeInDown {
  animation-name: fadeInDown;
}
.animated.fadeInUp {
  animation-name: fadeInUp;
}
.animated.moveUp {
  animation-name: moveUp;
}

              
            
!

JS

              
                // Trigger CSS animations on scroll.
// Detailed explanation can be found at http://www.bram.us/2013/11/20/scroll-animations/

// Looking for a version that also reverses the animation when
// elements scroll below the fold again?
// --> Check https://codepen.io/bramus/pen/vKpjNP

jQuery(function($) {
  
  // Function which adds the 'animated' class to any '.animatable' in view
  var doAnimations = function() {
    
    // Calc current offset and get all animatables
    var offset = $(window).scrollTop() + $(window).height(),
        $animatables = $('.animatable');
    
    // Unbind scroll handler if we have no animatables
    if ($animatables.length == 0) {
      $(window).off('scroll', doAnimations);
    }
    
    // Check all animatables and animate them if necessary
		$animatables.each(function(i) {
       var $animatable = $(this);
			if (($animatable.offset().top + $animatable.height() - 20) < offset) {
        $animatable.removeClass('animatable').addClass('animated');
			}
    });

	};
  
  // Hook doAnimations on scroll, and trigger a scroll
	$(window).on('scroll', doAnimations);
  $(window).trigger('scroll');

});
              
            
!
999px

Console