Pen Settings



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


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.


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.


                <link rel="stylesheet" type="text/css" href="">
<link rel="stylesheet" type="text/css" href="">
<script src=""></script>

<div class="intro">
  <h1>Scroll down to see the animation</h1>
  <h1>The animation will start only when the element is visible on the screen</h1>
  <h1>Resize the page to see the difference</h1>
<div class="container-fluid text-center">
  <h1>Some cool facts</h1>
  <div class="row">
    <div class="col-sm-3">
      <i class="fa fa-user"></i>
      <h2 data-max="50">+ Happy Customers</h2>
    <div class="col-sm-3">
      <i class="fa fa-code"></i>
      <h2 data-max="25000">+ Lines of code</h2>
    <div class="col-sm-3">
      <i class="fa fa-lock"></i>
      <h2 data-max="10">+ Projects</h2>
    <div class="col-sm-3">
      <i class="fa fa-briefcase"></i>
      <h2 data-max="30" id="test">+ Developers</h2>



div {
  padding: 0;
  margin: 0;
i {
  font-size: 4em !important;
  margin-top: 10%;
  color: teal;

h1 {
  padding-top: 30px;
  color: white !important;

h2 {
  color: teal;

.intro {
  height: auto;
  min-height: 100vh;
  text-align: center;
  background-color: teal;



                function inVisible(element) {
  //Checking if the element is
  //visible in the viewport
  var WindowTop = $(window).scrollTop();
  var WindowBottom = WindowTop + $(window).height();
  var ElementTop = element.offset().top;
  var ElementBottom = ElementTop + element.height();
  //animating the element if it is
  //visible in the viewport
  if ((ElementBottom <= WindowBottom) && ElementTop >= WindowTop)

function animate(element) {
  //Animating the element if not animated before
  if (!element.hasClass('ms-animated')) {
    var maxval ='max');
    var html = element.html();
      countNum: element.html()
      countNum: maxval
    }, {
      //duration 5 seconds
      duration: 5000,
      easing: 'linear',
      step: function() {
        element.html(Math.floor(this.countNum) + html);
      complete: function() {
        element.html(this.countNum + html);


//When the document is ready
$(function() {
  //This is triggered when the
  //user scrolls the page
  $(window).scroll(function() {
    //Checking if each items to animate are 
    //visible in the viewport
    $("h2[data-max]").each(function() {