cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <!-- First section -->
<header>
  <h1 class="animated bounceInDown">Animate.css</h1>
  <h2 class="animated bounceInDown">Level Up Your Websites with Animate.css</h2>
  <span class="animated bounce"></span>
</header>

<!-- Scroll animations section -->
<h2 class="new-section">Scroll Animations</h2>
<div class="scroll-animations">
  <div class="animated">
    <span>&#9742;</span>
    <h3>Number One</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis lacinia est. Nulla malesuada massa orci, vitae placerat lorem pharetra a.</p>
  </div>
  <div class="animated">
    <span>&#9835;</span>
    <h3>Number Two</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis lacinia est. Nulla malesuada massa orci, vitae placerat lorem pharetra a.</p>
  </div>
  <div class="animated">
    <span>&#9730;</span>
    <h3>Number Three</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis lacinia est. Nulla malesuada massa orci, vitae placerat lorem pharetra a.</p>
  </div>
</div>

<!-- Click animations section -->
<div class="click-animations">
  <h2 class="new-section">Click Animations</h2>
  <form>
    <input type="text" placeholder="Name" id="name" />
    <input type="text" placeholder="Email" id="email" />
    <textarea rows="7" placeholder="Message" id="message"></textarea>
  </form>
  <button>Send</button>
</div>

<!-- Funky animations section -->
<div class="funky-animations">
  <h2 class="new-section">Funky Animations</h2>
  <h3>Don't try this at home kids</h3>
  <div>
    <h4>Click Me</h4>
  </div>
</div>

<!-- Footer -->
<footer>
  Made with <span class="animated pulse">&#9829;</span> and <span class="animated swing">&#60;&#47;&#62;</span>
  <br /> Check out the tutorial on <a href="https://scotch.io/tutorials/level-up-your-websites-with-animatecss" target="_blank">Scotch.io</a>
</footer>
            
          
!
            
              
/* General/reset styles */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  color: #333;
}

.new-section {
  padding-top: 50px;
  text-align: center;
  font-size: 4em;
  font-weight: 100;
}

/* Header styles */

header {
  position: relative;
  text-align: center;
  height: 100vh;
  background: linear-gradient(to right, #69bcf4, #30cc8b);
  color: #fff;
}

header h1 {
  padding-top: 100px;
  padding-top: -webkit-calc(50vh - 113px);
  padding-top: expression(50vh - 113px);
  padding-top: -moz-calc(50vh - 113px);
  padding-top: -o-calc(50vh - 113px);
  padding-top: calc(50vh - 113px);
  font-size: 7em;
  font-weight: 100;
}

header h2 {
  font-size: 2em;
}

header span.animated {
  position: absolute;
  margin: auto;
  right: 0;
  left: 0;
  bottom: 50px;
  height: 4px;
  width: 4px;
  border-radius: 2px;
  background: #fff;
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
}

header span::before,
header span::after {
  position: absolute;
  top: -23px;
  content: "";
  height: 30px;
  width: 4px;
  border-radius: 2px;
  background: #fff;
}

header span::before {
  left: -10px;
  -webkit-transform: rotate(-45deg);
  -moz-transform:    rotate(-45deg);
  -ms-transform:     rotate(-45deg);
  -o-transform:      rotate(-45deg);
  transform:         rotate(-45deg);
}

header span::after {
  right: -10px;
  -webkit-transform: rotate(45deg);
  -moz-transform:    rotate(45deg);
  -ms-transform:     rotate(45deg);
  -o-transform:      rotate(45deg);
  transform:         rotate(45deg);
}

/* Scroll animations styles */

.scroll-animations {
  display: flex;
}

.scroll-animations div {
  flex-grow: 1;
  padding: 30px;
  text-align: center;
  opacity: 0;
  color: #333;
}

.scroll-animations div span {
  font-size: 4em;
  color: #5AA9E0;
}

.scroll-animations div h3 {
  font-size: 1.9em;
  font-weight: 400;
  margin-bottom: 10px;
}

/* Click animations styles */

.click-animations {
  margin-top: 35px;
  padding-bottom: 20px;
  background: #f6f8fa;
}

.click-animations input {
  display: block;
  margin: 20px auto;
  padding: 10px;
  height: 50px;
  width: 50%;
  font-size: 30px;
  outline: none;
  border: 2px solid transparent;
  transition: 0.3s;
}

.click-animations textarea {
  display: block;
  margin: 20px auto;
  padding: 10px;
  width: 50%;
  font-size: 30px;
  outline: none;
  border: 2px solid transparent;
  resize: none;
  transition: 0.3s;
}

.click-animations input:focus,
.click-animations textarea:focus {
  border-color: #30cc8b;
}

.click-animations button {
  display: block;
  margin: 20px auto;
  padding: 10px;
  width: 50%;
  font-size: 30px;
  border: none;
  outline: none;
  background: #30cc8b;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.click-animations button:active {
  transform: scale(0.95);
}

.form-error {
  border-color: #F46036 !important;
}

.funky-animations {
  text-align: center;
}

.funky-animations h3 {
  font-size: 2em;
}

.funky-animations div {
  margin: 120px auto;
  padding-top: 6px;
  height: 100px;
  width: 320px;
  border: 4px solid #f6f8fa;
}

.funky-animations h4 {
  font-size: 4.5em;
  font-weight: 400;
  /* Fallback color */
  color: #30cc8b;
  background: -webkit-linear-gradient(left, #69bcf4, #30cc8b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

footer {
  text-align: center;
  padding: 25px;
  background: #f6f8fa;
  font-size: 1.5em;
}

footer span {
  display: inline-block;
  color: #F46036;
  animation-iteration-count: infinite;
}

footer span:nth-child(2) {
  color: #30cc8b;
  animation-duration: 5s;
}

footer a {
  color: #69bcf4;
}

/* Media queries */

@media (max-width: 759px) {
  header h1 {
    font-size: 5em;
  }
  
  .new-section {
    font-size: 3em;
  }
  
  .scroll-animations {
    display: block;
  }
  
  .scroll-animations div {
    padding: 20px 80px;
  }
  
  .click-animations input,
  .click-animations textarea,
  .click-animations button {
    width: 80%;
  }
}

@media (max-width: 475px) {
  .new-section {
    font-size: 2.5em;
  } 
  
  header h1 {
    font-size: 3.2em;
  }
  
  header h2,
  .funky-animations h3 {
    font-size: 1.5em;
  }
  
}
            
          
!
            
              // Scroll function courtesy of Scott Dowding; http://stackoverflow.com/questions/487073/check-if-element-is-visible-after-scrolling

$(document).ready(function() {
  // Check if element is scrolled into view
  function isScrolledIntoView(elem) {
    var docViewTop = $(window).scrollTop();
    var docViewBottom = docViewTop + $(window).height();

    var elemTop = $(elem).offset().top;
    var elemBottom = elemTop + $(elem).height();

    return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
  }
  // If element is scrolled into view, fade it in
  $(window).scroll(function() {
    $('.scroll-animations .animated').each(function() {
      if (isScrolledIntoView(this) === true) {
        $(this).addClass('fadeInLeft');
      }
    });
  });

  // Click Animations
  $('button').on('click', function() {
    /*
    If any input is empty make it's border red and shake it. After the animation is complete, remove the shake and animated classes so that the animation can repeat.
    */
    
    // Check name input
    if ($('#name').val() === '') {
      $('#name').addClass('form-error animated shake').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
        $(this).removeClass('animated shake');
      });
    } else {
      $('#name').removeClass('form-error');
    }
    
    // Check email input
    if ($('#email').val() === '') {
      $('#email').addClass('form-error animated shake').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
        $(this).removeClass('animated shake');
      });
    } else {
      $('#email').removeClass('form-error');
    }

    // Check message textarea
    if ($('#message').val() === '') {
      $('#message').addClass('form-error animated shake').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
        $(this).removeClass('animated shake');
      });
    } else {
      $('#message').removeClass('form-error');
    }

  });
  
  // Activate hinge effect when h4 is click in last section
  $('.funky-animations h4').on('click', function() {
    $(this).addClass('animated hinge').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
        $(this).removeClass('animated hinge');
      });
  });
});
            
          
!
999px
Loading ..................

Console