Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                <section class="animation-mixin">
      <div class="pad head-title">
      
      <h1  style="text-decoration:underline;">CSS3 Animations Style Library</h1>
      <h3>Bounce <span>@mixin animation-bounce();</span> <span class="source-code">Code</span></h3>
      <div class="source-code-block">
        <pre>
          <code>
            /* ================================= Animation Bouncing Effect ================================= */
            @mixin animation-bounce() {  
              @include css3-prefix(animation, bounce 1s);
              @include css3-prefix(transform-origin, center bottom);  

              @-webkit-keyframes bounce {
                20%, 53%, 80%, to {
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                  @include css3-prefix(transform, translate3d(0,0,0));
                }

                40%, 43% {
                  @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
                  @include css3-prefix(transform, translate3d(0, -30px, 0));
                }

                70% {
                  @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, -4px, 0));
                }
              }

              @-moz-keyframes bounce {
                20%, 53%, 80%, to {
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                  @include css3-prefix(transform, translate3d(0,0,0));
                }

                40%, 43% {
                  @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
                  @include css3-prefix(transform, translate3d(0, -30px, 0));
                }

                70% {
                  @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, -4px, 0));
                }
              }

              @keyframes bounce {
                20%, 53%, 80%, to {
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                  @include css3-prefix(transform, translate3d(0,0,0));
                }

                40%, 43% {
                  @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
                  @include css3-prefix(transform, translate3d(0, -30px, 0));
                }

                70% {
                  @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, -4px, 0));
                }
              }
            }
          </code>
        </pre>
      </div>
      <div class="animation animation-bounce">
        <h1>Animation Effect</h1>
      </div>

      <h3>Swing <span>@mixin animation-swing();</span><span class="source-code">Code</span></h3>
      <div class="source-code-block">
        <pre>
          <code>
            /* ================================= Swing Effect ================================= */
            @mixin animation-swing() {
              @include css3-prefix(animation, swing 1s);
              @include css3-prefix(transform-origin, top center);

              @-webkit-keyframes swing {
                20% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 15deg));
                }

                40% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, -10deg));
                }

                60% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 5deg));
                }

                80% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, -5deg));
                }

                to {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 0deg));
                }
              }
              @-moz-keyframes swing {
                20% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 15deg));
                }

                40% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, -10deg));
                }

                60% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 5deg));
                }

                80% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, -5deg));
                }

                to {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 0deg));
                }
              }
              @keyframes swing {
                20% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 15deg));
                }

                40% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, -10deg));
                }

                60% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 5deg));
                }

                80% {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, -5deg));
                }

                to {
                  @include css3-prefix(transform, rotate3d(0, 0, 1, 0deg));
                }
              }
            }
          </code>
        </pre>
      </div>
      <div class="animation animation-swing">
        <h1>Animation Effect</h1>
      </div>

      <h3>Dancing <span>@mixin animation-dancing();</span><span class="source-code">Code</span></h3>
      <div class="source-code-block">
        <pre>
          <code>
            /* ================================= Dancing Effect ================================= */
            @mixin animation-dancing() {
              @include css3-prefix(animation, dancing 1s);
              @include css3-prefix(transform-origin, center);

              @-webkit-keyframes dancing {
                10%, to {
                  @include css3-prefix(transform, none);
                }

                20% {
                  @include css3-prefix(transform, skewX(-15deg) skewY(-15deg));
                }

                30% {
                  @include css3-prefix(transform, skewX(7deg) skewY(7deg));
                }

                40% {
                  @include css3-prefix(transform, skewX(-5deg) skewY(-5deg));
                }

                50% {
                  @include css3-prefix(transform, skewX(1deg) skewY(1deg));
                }

                60% {
                  @include css3-prefix(transform, skewX(-.1deg) skewY(.1deg));
                }

                70% {
                  @include css3-prefix(transform, skewX(.5deg) skewY(.5deg));
                }

                80% {
                  @include css3-prefix(transform, skewX(0deg) skewY(0deg));
                }
              }

              @-moz-keyframes dancing {
                10%, to {
                  @include css3-prefix(transform, none);
                }

                20% {
                  @include css3-prefix(transform, skewX(-15deg) skewY(-15deg));
                }

                30% {
                  @include css3-prefix(transform, skewX(7deg) skewY(7deg));
                }

                40% {
                  @include css3-prefix(transform, skewX(-5deg) skewY(-5deg));
                }

                50% {
                  @include css3-prefix(transform, skewX(1deg) skewY(1deg));
                }

                60% {
                  @include css3-prefix(transform, skewX(-.1deg) skewY(.1deg));
                }

                70% {
                  @include css3-prefix(transform, skewX(.5deg) skewY(.5deg));
                }

                80% {
                  @include css3-prefix(transform, skewX(0deg) skewY(0deg));
                }
              }

              @keyframes dancing {
                10%, to {
                  @include css3-prefix(transform, none);
                }

                20% {
                  @include css3-prefix(transform, skewX(-15deg) skewY(-15deg));
                }

                30% {
                  @include css3-prefix(transform, skewX(7deg) skewY(7deg));
                }

                40% {
                  @include css3-prefix(transform, skewX(-5deg) skewY(-5deg));
                }

                50% {
                  @include css3-prefix(transform, skewX(1deg) skewY(1deg));
                }

                60% {
                  @include css3-prefix(transform, skewX(-.1deg) skewY(.1deg));
                }

                70% {
                  @include css3-prefix(transform, skewX(.5deg) skewY(.5deg));
                }

                80% {
                  @include css3-prefix(transform, skewX(0deg) skewY(0deg));
                }
              }
            }
          </code>
        </pre>
      </div>
      <div class="animation animation-dancing">
        <h1>Animation Effect</h1>
      </div>

      <h3>Bounce In <span>@mixin animation-bounceIn();</span><span class="source-code">Code</span></h3>
      <div class="source-code-block">
        <pre>
          <code>
            /* ================================= Bounce In Effect ================================= */
            @mixin animation-bounceIn() {
              @include css3-prefix(animation, bounceIn 1s);

              @-webkit-keyframes bounceIn {
                from, 20%, 40%, 60%, 80%, to {
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.215, 0.610, 0.355, 1.000));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, scale3d(.3, .3, .3));
                }

                40% {
                  @include css3-prefix(transform, scale3d(1.1, 1.1, 1.1));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, scale3d(1.03, 1.03, 1.03));
                }

                80% {      
                  @include css3-prefix(transform, scale3d(.97, .97, .97));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, scale3d(1, 1, 1));
                }
              }

              @-moz-keyframes bounceIn {
                from, 20%, 40%, 60%, 80%, to {
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.215, 0.610, 0.355, 1.000));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, scale3d(.3, .3, .3));
                }

                40% {
                  @include css3-prefix(transform, scale3d(1.1, 1.1, 1.1));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, scale3d(1.03, 1.03, 1.03));
                }

                80% {      
                  @include css3-prefix(transform, scale3d(.97, .97, .97));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, scale3d(1, 1, 1));
                }
              }

              @keyframes bounceIn {
                from, 20%, 40%, 60%, 80%, to {
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.215, 0.610, 0.355, 1.000));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, scale3d(.3, .3, .3));
                }

                40% {
                  @include css3-prefix(transform, scale3d(1.1, 1.1, 1.1));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, scale3d(1.03, 1.03, 1.03));
                }

                80% {      
                  @include css3-prefix(transform, scale3d(.97, .97, .97));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, scale3d(1, 1, 1));
                }
              }

            }
          </code>
        </pre>
      </div>
      <div class="animation animation-bouncein">
        <h1>Animation Effect</h1>
      </div>

      <h3>Bounce In Left <span>@mixin animation-bounceInLeft();</span><span class="source-code">Code</span></h3>
      <div class="source-code-block">
        <pre>
          <code>
            /* ================================= Bounce In Left Effect ================================= */
            @mixin animation-bounceInLeft() {
              @include css3-prefix(animation, bounceInLeft 1s);

              @-webkit-keyframes bounceInLeft {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(-3000px, 0, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(25px, 0, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(-20px, 0, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(5px, 0, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0px, 0, 0));
                }
              }

              @-moz-keyframes bounceInLeft {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(-3000px, 0, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(25px, 0, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(-20px, 0, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(5px, 0, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0px, 0, 0));
                }
              }

              @keyframes bounceInLeft {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(-3000px, 0, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(25px, 0, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(-20px, 0, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(5px, 0, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0px, 0, 0));
                }
              }
            }
          </code>
        </pre>
      </div>
      <div class="animation">
        <h1 class="animation-bounceInLeft">Animation Effect</h1>
      </div>

      <h3>Bounce In Right <span>@mixin animation-bounceInRight();</span><span class="source-code">Code</span></h3>
      <div class="source-code-block">
        <pre>
          <code>
            /* ================================= Bounce In Right Effect ================================= */
            @mixin animation-bounceInRight() {
              @include css3-prefix(animation, bounceInRight 1s);

              @-webkit-keyframes bounceInRight {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(3000px, 0, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(25px, 0, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(-20px, 0, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(5px, 0, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0px, 0, 0));
                }
              }

              @-moz-keyframes bounceInRight {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(3000px, 0, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(25px, 0, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(-20px, 0, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(5px, 0, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0px, 0, 0));
                }
              }

              @keyframes bounceInRight {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(3000px, 0, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(25px, 0, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(-20px, 0, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(5px, 0, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0px, 0, 0));
                }
              }
            }
          </code>
        </pre>
      </div>
      <div class="animation">
        <h1 class="animation-bounceInRight">Animation Effect</h1>
      </div>

      <h3>Bounce In Up <span>@mixin animation-bounceInUp();</span><span class="source-code">Code</span></h3>
      <div class="source-code-block">
        <pre>
          <code>
            /* ================================= Bounce In Up Effect ================================= */
            @mixin animation-bounceInUp() {
              @include css3-prefix(animation, bounceInUp 1s);

              @-webkit-keyframes bounceInUp {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(0, -800px, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 25px, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, 5px, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 0, 0));
                }
              }

              @-moz-keyframes bounceInUp {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(0, -800px, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 25px, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, 5px, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 0, 0));
                }
              }

              @keyframes bounceInUp {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(0, -800px, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 25px, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, 5px, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 0, 0));
                }
              }
            }
          </code>
        </pre>
      </div>
      <div class="animation">
        <h1 class="animation-bounceInUp">Animation Effect</h1>
      </div>

      <h3>Bounce In Down <span>@mixin animation-bounceInDown();</span><span class="source-code">Code</span></h3>
      <div class="source-code-block">
        <pre>
          <code>
            /* ================================= Bounce In Down Effect ================================= */
            @mixin animation-bounceInDown() {
              @include css3-prefix(animation, bounceInDown 1s);

              @-webkit-keyframes bounceInDown {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(0, 800px, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 25px, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, 5px, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 0, 0));
                }
              }

              @-moz-keyframes bounceInDown {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(0, 800px, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 25px, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, 5px, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 0, 0));
                }
              }

              @keyframes bounceInDown {
                from, 60%, 70%, 95%, to { 
                  @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
                }

                0% {
                  @include opacity(0);
                  @include css3-prefix(transform, translate3d(0, 800px, 0));
                }

                60% {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 25px, 0));
                }

                80% {
                  @include css3-prefix(transform, translate3d(0, -15px, 0));
                }

                90% {
                  @include css3-prefix(transform, translate3d(0, 5px, 0));
                }

                to {
                  @include opacity(1);
                  @include css3-prefix(transform, translate3d(0, 0, 0));
                }
              }
            }
          </code>
        </pre>
      </div>
      <div class="animation">
        <h1 class="animation-bounceInDown">Animation Effect</h1>
      </div>
    </section>

              
            
!

CSS

              
                /* Add browser prefix to the css3 properties */
@import "compass";
@mixin css3-prefix($property, $value)  {
  -webkit-#{$property}: #{$value};
   -khtml-#{$property}: #{$value};
     -moz-#{$property}: #{$value};
      -ms-#{$property}: #{$value};
       -o-#{$property}: #{$value};
          #{$property}: #{$value};
}

/* ================================= Animation Bouncing Effect ================================= */
@mixin animation-bounce() {  
  @include css3-prefix(animation, bounce 1s);
  @include css3-prefix(transform-origin, center bottom);  

  @-webkit-keyframes bounce {
    20%, 53%, 80%, to {
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
      @include css3-prefix(transform, translate3d(0,0,0));
    }

    40%, 43% {
      @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
      @include css3-prefix(transform, translate3d(0, -30px, 0));
    }

    70% {
      @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, -4px, 0));
    }
  }

  @-moz-keyframes bounce {
    20%, 53%, 80%, to {
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
      @include css3-prefix(transform, translate3d(0,0,0));
    }

    40%, 43% {
      @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
      @include css3-prefix(transform, translate3d(0, -30px, 0));
    }

    70% {
      @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, -4px, 0));
    }
  }

  @keyframes bounce {
    20%, 53%, 80%, to {
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
      @include css3-prefix(transform, translate3d(0,0,0));
    }

    40%, 43% {
      @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
      @include css3-prefix(transform, translate3d(0, -30px, 0));
    }

    70% {
      @include css3-prefix(animation-timing-function, cubic-bezier(.7, .05, .8, .06));
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, -4px, 0));
    }
  }
}

/* ================================= Swing Effect ================================= */
@mixin animation-swing() {
  @include css3-prefix(animation, swing 1s);
  @include css3-prefix(transform-origin, top center);

  @-webkit-keyframes swing {
    20% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 15deg));
    }

    40% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, -10deg));
    }

    60% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 5deg));
    }

    80% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, -5deg));
    }

    to {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 0deg));
    }
  }
  @-moz-keyframes swing {
    20% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 15deg));
    }

    40% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, -10deg));
    }

    60% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 5deg));
    }

    80% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, -5deg));
    }

    to {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 0deg));
    }
  }
  @keyframes swing {
    20% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 15deg));
    }

    40% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, -10deg));
    }

    60% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 5deg));
    }

    80% {
      @include css3-prefix(transform, rotate3d(0, 0, 1, -5deg));
    }

    to {
      @include css3-prefix(transform, rotate3d(0, 0, 1, 0deg));
    }
  }
}

/* ================================= Dancing Effect ================================= */
@mixin animation-dancing() {
  @include css3-prefix(animation, dancing 1s);
  @include css3-prefix(transform-origin, center);

  @-webkit-keyframes dancing {
    10%, to {
      @include css3-prefix(transform, none);
    }

    20% {
      @include css3-prefix(transform, skewX(-15deg) skewY(-15deg));
    }

    30% {
      @include css3-prefix(transform, skewX(7deg) skewY(7deg));
    }

    40% {
      @include css3-prefix(transform, skewX(-5deg) skewY(-5deg));
    }

    50% {
      @include css3-prefix(transform, skewX(1deg) skewY(1deg));
    }

    60% {
      @include css3-prefix(transform, skewX(-.1deg) skewY(.1deg));
    }

    70% {
      @include css3-prefix(transform, skewX(.5deg) skewY(.5deg));
    }

    80% {
      @include css3-prefix(transform, skewX(0deg) skewY(0deg));
    }
  }

  @-moz-keyframes dancing {
    10%, to {
      @include css3-prefix(transform, none);
    }

    20% {
      @include css3-prefix(transform, skewX(-15deg) skewY(-15deg));
    }

    30% {
      @include css3-prefix(transform, skewX(7deg) skewY(7deg));
    }

    40% {
      @include css3-prefix(transform, skewX(-5deg) skewY(-5deg));
    }

    50% {
      @include css3-prefix(transform, skewX(1deg) skewY(1deg));
    }

    60% {
      @include css3-prefix(transform, skewX(-.1deg) skewY(.1deg));
    }

    70% {
      @include css3-prefix(transform, skewX(.5deg) skewY(.5deg));
    }

    80% {
      @include css3-prefix(transform, skewX(0deg) skewY(0deg));
    }
  }

  @keyframes dancing {
    10%, to {
      @include css3-prefix(transform, none);
    }

    20% {
      @include css3-prefix(transform, skewX(-15deg) skewY(-15deg));
    }

    30% {
      @include css3-prefix(transform, skewX(7deg) skewY(7deg));
    }

    40% {
      @include css3-prefix(transform, skewX(-5deg) skewY(-5deg));
    }

    50% {
      @include css3-prefix(transform, skewX(1deg) skewY(1deg));
    }

    60% {
      @include css3-prefix(transform, skewX(-.1deg) skewY(.1deg));
    }

    70% {
      @include css3-prefix(transform, skewX(.5deg) skewY(.5deg));
    }

    80% {
      @include css3-prefix(transform, skewX(0deg) skewY(0deg));
    }
  }
}

/* ================================= Bounce In Effect ================================= */
@mixin animation-bounceIn() {
  @include css3-prefix(animation, bounceIn 1s);

  @-webkit-keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to {
      @include css3-prefix(animation-timing-function, cubic-bezier(0.215, 0.610, 0.355, 1.000));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, scale3d(.3, .3, .3));
    }

    40% {
      @include css3-prefix(transform, scale3d(1.1, 1.1, 1.1));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, scale3d(1.03, 1.03, 1.03));
    }

    80% {      
      @include css3-prefix(transform, scale3d(.97, .97, .97));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, scale3d(1, 1, 1));
    }
  }

  @-moz-keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to {
      @include css3-prefix(animation-timing-function, cubic-bezier(0.215, 0.610, 0.355, 1.000));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, scale3d(.3, .3, .3));
    }

    40% {
      @include css3-prefix(transform, scale3d(1.1, 1.1, 1.1));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, scale3d(1.03, 1.03, 1.03));
    }

    80% {      
      @include css3-prefix(transform, scale3d(.97, .97, .97));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, scale3d(1, 1, 1));
    }
  }

  @keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to {
      @include css3-prefix(animation-timing-function, cubic-bezier(0.215, 0.610, 0.355, 1.000));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, scale3d(.3, .3, .3));
    }

    40% {
      @include css3-prefix(transform, scale3d(1.1, 1.1, 1.1));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, scale3d(1.03, 1.03, 1.03));
    }

    80% {      
      @include css3-prefix(transform, scale3d(.97, .97, .97));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, scale3d(1, 1, 1));
    }
  }

}

/* ================================= Bounce In Left Effect ================================= */
@mixin animation-bounceInLeft() {
  @include css3-prefix(animation, bounceInLeft 1s);

  @-webkit-keyframes bounceInLeft {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(-3000px, 0, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(25px, 0, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(-20px, 0, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(5px, 0, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0px, 0, 0));
    }
  }

  @-moz-keyframes bounceInLeft {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(-3000px, 0, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(25px, 0, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(-20px, 0, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(5px, 0, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0px, 0, 0));
    }
  }

  @keyframes bounceInLeft {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(-3000px, 0, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(25px, 0, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(-20px, 0, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(5px, 0, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0px, 0, 0));
    }
  }
}

/* ================================= Bounce In Right Effect ================================= */
@mixin animation-bounceInRight() {
  @include css3-prefix(animation, bounceInRight 1s);

  @-webkit-keyframes bounceInRight {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(3000px, 0, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(25px, 0, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(-20px, 0, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(5px, 0, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0px, 0, 0));
    }
  }

  @-moz-keyframes bounceInRight {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(3000px, 0, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(25px, 0, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(-20px, 0, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(5px, 0, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0px, 0, 0));
    }
  }

  @keyframes bounceInRight {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(3000px, 0, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(25px, 0, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(-20px, 0, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(5px, 0, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0px, 0, 0));
    }
  }
}

/* ================================= Bounce In Up Effect ================================= */
@mixin animation-bounceInUp() {
  @include css3-prefix(animation, bounceInUp 1s);

  @-webkit-keyframes bounceInUp {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(0, -800px, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 25px, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, 5px, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 0, 0));
    }
  }

  @-moz-keyframes bounceInUp {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(0, -800px, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 25px, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, 5px, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 0, 0));
    }
  }

  @keyframes bounceInUp {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(0, -800px, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 25px, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, 5px, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 0, 0));
    }
  }
}

/* ================================= Bounce In Down Effect ================================= */
@mixin animation-bounceInDown() {
  @include css3-prefix(animation, bounceInDown 1s);

  @-webkit-keyframes bounceInDown {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(0, 800px, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 25px, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, 5px, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 0, 0));
    }
  }

  @-moz-keyframes bounceInDown {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(0, 800px, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 25px, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, 5px, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 0, 0));
    }
  }

  @keyframes bounceInDown {
    from, 60%, 70%, 95%, to { 
      @include css3-prefix(animation-timing-function, cubic-bezier(0.2, 0.6, 0.3, 1));
    }

    0% {
      @include opacity(0);
      @include css3-prefix(transform, translate3d(0, 800px, 0));
    }

    60% {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 25px, 0));
    }

    80% {
      @include css3-prefix(transform, translate3d(0, -15px, 0));
    }

    90% {
      @include css3-prefix(transform, translate3d(0, 5px, 0));
    }

    to {
      @include opacity(1);
      @include css3-prefix(transform, translate3d(0, 0, 0));
    }
  }
}

/* ============= Reset style ========== */
h1 {
	font-size: 3.2em;	
  line-height: 1.5;
	text-align: center;
  margin-bottom: 15px;
}

h2  {
	font-size: 3em;	
  line-height: 1.5;
	text-align: center;
  margin-bottom: 15px;
}

h3 {
	font-size: 2em;	
  line-height: 1.5;
  margin-bottom: 15px;
	span {
		background-color: #fff;
		padding: 5px;
		border: 1px solid #ddd;
		font-size: 0.7em;
	}
}

h4 {
  font-size: 1.5em;
  line-height: 1.5;
  margin-bottom: 15px;
}

/* ================================= CSS3 Animations ================================= */
.animation {      
  h1 {    
    font-size: 6em;
    font-style: italic;
    font-weight: normal;
  }
}

.animation-bounce {
  @include animation-bounce();  
}

.animation-swing {
  @include animation-swing();  
}

.animation-dancing {
  @include animation-dancing();  
}

.animation-bouncein {
  @include animation-bounceIn();  
}

.animation-bounceInLeft  {
  @include animation-bounceInLeft(); 
}

.animation-bounceInRight {
  @include animation-bounceInRight();  
}

.animation-bounceInUp {
  @include animation-bounceInUp();  
}

.animation-bounceInDown {
  @include animation-bounceInDown();  
}

.animation-mixin {
  background-color: #fff;
  padding: 60px 20px;  
}

.css3-mixins {
  background-color: #fff;
  padding: 60px 20px;
}

.css3-mixins h3 {
  margin-top: 30px;
}

/* ================================= END CSS3 Animations ================================= */

.source-code {
  margin-left: 50px;
  margin-bottom: 20px;
  background-color: #FF8105 !important;
  padding: 5px 20px;
  color: #FFFFFF;
  cursor: pointer;
}

.source-code-block {
  background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 30px;
    line-height: 1.5;
    display: none;
}

.head-title {
  text-align: center;
}
.hidden{
     opacity:0;
}
.visible{
     opacity:1;
}
              
            
!

JS

              
                
$(document).ready(function(){
	$(".source-code").click(function(){
		$(this).parent().next(".source-code-block").slideToggle();
	});
	
$('.animation h1').addClass("hidden").viewportChecker({
  classToAdd: 'visible animated fadeIn',
  offset: 100
});

});


              
            
!
999px

Console