Skip to content

Instantly share code, notes, and snippets.

@moseskamau338
Forked from roachhd/README.md
Created October 13, 2022 07:27
Show Gist options
  • Save moseskamau338/cb741fbd091039a4cebbb4ed22abd9a4 to your computer and use it in GitHub Desktop.
Save moseskamau338/cb741fbd091039a4cebbb4ed22abd9a4 to your computer and use it in GitHub Desktop.
CSS Animation cheatsheet featuring Mr T.

A collection of awesome CSS animations featuring the super Mr T.

<html class="no-js" lang="en"><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <title>CSS3 Animation Cheat Sheet - Justin Aguilar</title> <link href="http://www.justinaguilar.com/animations/css/reset.css" rel="stylesheet"> <link href="http://www.justinaguilar.com/animations/css/animations.css" rel="stylesheet"> <link href="http://www.justinaguilar.com/animations/css/style.css" rel="stylesheet"> <link href="http://www.justinaguilar.com/animations/css/novecentowide_demibold/stylesheet.css" rel="stylesheet" type="text/css" charset="utf-8"> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600" rel="stylesheet" type="text/css"> </head><body> <header class="header"> <h1 id="logo-type"><a href="index.html">CSS3 Animation Cheat Sheet</a></h1> <nav class="nav"> <ul> <li class="hide"><a href="index.html#how">How it works</a></li> <li><a href="scrolling.html">Examples</a></li> <li><a href="index.html#download">Download</a></li> <li class="hide"><a href="https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Ftwitter.com%2Fabout%2Fresources%2Fbuttons&text=Check%20out%20this%20awesome%20set%20of%20CSS3%20animations%20for%20your%20website&tw_p=tweetbutton&url=http%3A%2F%2Fwww.justinaguilar.com%2Fanimations%2F&via=JXTN" target="blank">Share</a></li> </ul> </nav> </header> <section id="animation"> <div class="animation-container"> <div class="animate tossing" id="object"></div> </div> <div class="cta-wrapper"> <a class="examples" href="scrolling.html">See more examples →</a> </div> </section> <section id="actions"> <div class="container"> <h2>Entrances</h2> <a class="button" id="slideUpBtn" href="#">Slide Up ↑</a> <a class="button" id="slideDownBtn" href="#">Slide Down ↓</a> <a class="button" id="slideLeftBtn" href="#">Slide Left ←</a> <a class="button" id="slideRightBtn" href="#">Slide Right →</a> <a class="button" id="slideExpandUpBtn" href="#">Slide Expand Up ↑</a> <a class="button" id="expandUpBtn" href="#">Expand Up ↑</a> <a class="button" id="fadeInBtn" href="#">Fade In</a> <a class="button" id="expandOpenBtn" href="#">Expand Open</a> <a class="button" id="bigEntranceBtn" href="#">Big Entrance</a> <a class="button" id="hatchBtn" href="#">Hatch</a> <h2>Misc</h2> <a class="button" id="bounceBtn" href="#">Bounce</a> <a class="button" id="pulseBtn" href="#">Pulse</a> <a class="button" id="floatBtn" href="#">Floating</a> <a class="button" id="tossingBtn" href="#">Tossing</a> <a class="button" id="pullUpBtn" href="#">Pull Up ↑</a> <a class="button" id="pullDownBtn" href="#">Pull Down ↓</a> <a class="button" id="stretchLeftBtn" href="#">Stretch Left ←</a> <a class="button" id="stretchRightBtn" href="#">Stretch Right →</a> </div> </section> <section id="how"> <div class="container"> <h2>How it works</h2> <p> The CSS3 Animation Cheat Sheet is a set of preset, plug-and-play animations for your web projects. All you need to do is add the stylesheet to your website and apply the premade CSS classes to the elements you want animated. </p> <p> The CSS3 Animation Cheat Sheet uses CSS3 @keyframes and works on <a href="http://www.w3schools.com/cssref/css3_pr_animation-keyframes.asp">all the latest browsers</a> (that's IE 10). Using CSS3 @keyframes, you don't have to worry about positioning the element to accomodate the animations - it will animate into place. Also for users with older browsers, the animated element will be visible and in place, even if the animation doesn't trigger. Below are instructions on how to get started. </p> <h4>Add the animation stylesheet to the <head> element of your webpage:</h4> <pre><code class="no-corners"><link rel="stylesheet" href="<span>css</span>/animations.css"></code></pre> <div class="additional-info"> <p>Replace <span>css</span> with the name of the directory where the animation stylesheet is.</p> </div> <h4>Add an animation class to the element you want animated:</h4> <pre><code class="no-corners"><div id="object" <span>class="slideUp"</span>></code></pre> <div class="additional-info"> <p>Replace <span>slideUp</span> with the desired animation class.</p> </div> <h4>For entrance animations, you need to make them invisible by adding the <span>visibility: hidden</span> property to the animated element:</h4> <pre><code class="no-corners">#object{ background-color: #fe5652; <span>visibility: hidden;</span> }</code></pre> <div class="additional-info"> <p><span>visibility: hidden;</span> is used to hide elements before the animation is activated.</p> </div> <p class="emphasis"> The values for these animations are relative to the element's size. That means bigger images have more exaggerated animations and smaller images have more subtle animations. While these animations are simple to implement, feel free to tweak values in the stylesheet to get the right effect. </p> <h2>Adding effects</h2> <p> By default, these animations will trigger when the page loads - even if the element is further down the page - but by using jQuery there are many ways you can activate the animations. <a href="scrolling.html">See how you can use these animations on your website</a>. </p> <h4>Add jQuery to the <head> element of your webpage:</h4> <pre><code><script src="http://code.jquery.com/jquery-1.10.1.min.js"></script></code></pre> <h4>Add this before the </body> tag to trigger the animation when the user scrolls to the element:</h4> <pre><code class="no-corners"><script> $(window).scroll(function() { $('<span>#animatedElement</span>').each(function(){ var imagePos = $(this).offset().top; var topOfWindow = $(window).scrollTop(); if (imagePos < topOfWindow+<span class="modify">400</span>) { $(this).addClass("<span>slideUp</span>"); } }); }); </script></code></pre> <div class="additional-info"> <p>Replace <span>#animatedElement</span> with the ID or class of the element you want animated.</p> <p>Replace <span>slideUp</span> with an animation class.</p> <p><span class="modify">400</span> represents the space between the element and the top of the screen. The animation activates when the element is <span class="modify">400px</span> from the top of the screen. Increase this number to make the animaton activate sooner.</p> </div> <h4>Add this before the </body> tag to trigger the animation when the user clicks on the element:</h4> <pre><code class="no-corners"><script> $('<span>#animatedElement</span>').click(function() { $(this).addClass("<span>slideUp</span>"); }); </script></code></pre> <div class="additional-info"> <p>Replace <span>#animatedElement</span> with the ID or class of the element you want animated.</p> <p>Replace <span>slideUp</span> with an animation class.</p> </div> </div> </section> <section id="download"> <div class="container"> <a class="download" href="./css/animations.css" target="blank">Download</a> <p>All you need is the .CSS file!</p> </div> </section> <section id="contact"> <div class="container"> <a class="cta" href="https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Ftwitter.com%2Fabout%2Fresources%2Fbuttons&text=Check%20out%20this%20awesome%20set%20of%20CSS3%20animations%20for%20your%20website&tw_p=tweetbutton&url=http%3A%2F%2Fwww.justinaguilar.com%2Fanimations%2F&via=JXTN" target="blank"> <img class="pulse" alt="Twitter logo" src="./images/twitter-bird-light-bgs.png"> </a> <h2>If you found this project useful, spread the word on Twitter!</h2> <p class="contact">Direct your questions, comments, concerns, love letters, and cat videos to <a href="http://www.twitter.com/jxtn">@JXTN</a> or to my <a href="mailto:justin@justinaguilar.com">email</a>.</p> </div> </section> <script> $(window).scroll(function() { $('#examples-cta').each(function(){ var imagePos = $(this).offset().top; var topOfWindow = $(window).scrollTop(); if (imagePos < topOfWindow+400) { $(this).addClass("slideUp"); } }); }); </script> <script> /* ENTRANCES */ $('#slideUpBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("slideUp"); }); }); $('#slideDownBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("slideDown"); }); }); $('#slideLeftBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("slideLeft"); }); }); $('#slideRightBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("slideRight"); }); }); $('#slideExpandUpBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("slideExpandUp"); }); }); $('#expandUpBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("expandUp"); }); }); $('#fadeInBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("fadeIn"); }); }); $('#expandOpenBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("expandOpen"); }); }); $('#bigEntranceBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("bigEntrance"); }); }); $('#hatchBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("hatch"); }); }); /* MISC */ $('#bounceBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("bounce"); }); }); $('#pulseBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("pulse"); }); }); $('#floatBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("floating"); }); }); $('#tossingBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("tossing"); }); }); $('#pullUpBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("pullUp"); }); }); $('#pullDownBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("pullDown"); }); }); $('#stretchLeftBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("stretchLeft"); }); }); $('#stretchRightBtn').click(function() { $(this).each(function(){ $('#object').removeClass(); $('#object').addClass("stretchRight"); }); }); </script> </body></html>
/*
==============================================
CSS3 ANIMATION CHEAT SHEET
==============================================
Made by Justin Aguilar
www.justinaguilar.com/animations/
Questions, comments, concerns, love letters:
justin@justinaguilar.com
==============================================
*/
/*
==============================================
slideDown
==============================================
*/
.slideDown{
animation-name: slideDown;
-webkit-animation-name: slideDown;
animation-duration: 1s;
-webkit-animation-duration: 1s;
animation-timing-function: ease;
-webkit-animation-timing-function: ease;
visibility: visible !important;
}
@keyframes slideDown {
0% {
transform: translateY(-100%);
}
50%{
transform: translateY(8%);
}
65%{
transform: translateY(-4%);
}
80%{
transform: translateY(4%);
}
95%{
transform: translateY(-2%);
}
100% {
transform: translateY(0%);
}
}
@-webkit-keyframes slideDown {
0% {
-webkit-transform: translateY(-100%);
}
50%{
-webkit-transform: translateY(8%);
}
65%{
-webkit-transform: translateY(-4%);
}
80%{
-webkit-transform: translateY(4%);
}
95%{
-webkit-transform: translateY(-2%);
}
100% {
-webkit-transform: translateY(0%);
}
}
/*
==============================================
slideUp
==============================================
*/
.slideUp{
animation-name: slideUp;
-webkit-animation-name: slideUp;
animation-duration: 1s;
-webkit-animation-duration: 1s;
animation-timing-function: ease;
-webkit-animation-timing-function: ease;
visibility: visible !important;
}
@keyframes slideUp {
0% {
transform: translateY(100%);
}
50%{
transform: translateY(-8%);
}
65%{
transform: translateY(4%);
}
80%{
transform: translateY(-4%);
}
95%{
transform: translateY(2%);
}
100% {
transform: translateY(0%);
}
}
@-webkit-keyframes slideUp {
0% {
-webkit-transform: translateY(100%);
}
50%{
-webkit-transform: translateY(-8%);
}
65%{
-webkit-transform: translateY(4%);
}
80%{
-webkit-transform: translateY(-4%);
}
95%{
-webkit-transform: translateY(2%);
}
100% {
-webkit-transform: translateY(0%);
}
}
/*
==============================================
slideLeft
==============================================
*/
.slideLeft{
animation-name: slideLeft;
-webkit-animation-name: slideLeft;
animation-duration: 1s;
-webkit-animation-duration: 1s;
animation-timing-function: ease-in-out;
-webkit-animation-timing-function: ease-in-out;
visibility: visible !important;
}
@keyframes slideLeft {
0% {
transform: translateX(150%);
}
50%{
transform: translateX(-8%);
}
65%{
transform: translateX(4%);
}
80%{
transform: translateX(-4%);
}
95%{
transform: translateX(2%);
}
100% {
transform: translateX(0%);
}
}
@-webkit-keyframes slideLeft {
0% {
-webkit-transform: translateX(150%);
}
50%{
-webkit-transform: translateX(-8%);
}
65%{
-webkit-transform: translateX(4%);
}
80%{
-webkit-transform: translateX(-4%);
}
95%{
-webkit-transform: translateX(2%);
}
100% {
-webkit-transform: translateX(0%);
}
}
/*
==============================================
slideRight
==============================================
*/
.slideRight{
animation-name: slideRight;
-webkit-animation-name: slideRight;
animation-duration: 1s;
-webkit-animation-duration: 1s;
animation-timing-function: ease-in-out;
-webkit-animation-timing-function: ease-in-out;
visibility: visible !important;
}
@keyframes slideRight {
0% {
transform: translateX(-150%);
}
50%{
transform: translateX(8%);
}
65%{
transform: translateX(-4%);
}
80%{
transform: translateX(4%);
}
95%{
transform: translateX(-2%);
}
100% {
transform: translateX(0%);
}
}
@-webkit-keyframes slideRight {
0% {
-webkit-transform: translateX(-150%);
}
50%{
-webkit-transform: translateX(8%);
}
65%{
-webkit-transform: translateX(-4%);
}
80%{
-webkit-transform: translateX(4%);
}
95%{
-webkit-transform: translateX(-2%);
}
100% {
-webkit-transform: translateX(0%);
}
}
/*
==============================================
slideExpandUp
==============================================
*/
.slideExpandUp{
animation-name: slideExpandUp;
-webkit-animation-name: slideExpandUp;
animation-duration: 1.6s;
-webkit-animation-duration: 1.6s;
animation-timing-function: ease-out;
-webkit-animation-timing-function: ease -out;
visibility: visible !important;
}
@keyframes slideExpandUp {
0% {
transform: translateY(100%) scaleX(0.5);
}
30%{
transform: translateY(-8%) scaleX(0.5);
}
40%{
transform: translateY(2%) scaleX(0.5);
}
50%{
transform: translateY(0%) scaleX(1.1);
}
60%{
transform: translateY(0%) scaleX(0.9);
}
70% {
transform: translateY(0%) scaleX(1.05);
}
80%{
transform: translateY(0%) scaleX(0.95);
}
90% {
transform: translateY(0%) scaleX(1.02);
}
100%{
transform: translateY(0%) scaleX(1);
}
}
@-webkit-keyframes slideExpandUp {
0% {
-webkit-transform: translateY(100%) scaleX(0.5);
}
30%{
-webkit-transform: translateY(-8%) scaleX(0.5);
}
40%{
-webkit-transform: translateY(2%) scaleX(0.5);
}
50%{
-webkit-transform: translateY(0%) scaleX(1.1);
}
60%{
-webkit-transform: translateY(0%) scaleX(0.9);
}
70% {
-webkit-transform: translateY(0%) scaleX(1.05);
}
80%{
-webkit-transform: translateY(0%) scaleX(0.95);
}
90% {
-webkit-transform: translateY(0%) scaleX(1.02);
}
100%{
-webkit-transform: translateY(0%) scaleX(1);
}
}
/*
==============================================
expandUp
==============================================
*/
.expandUp{
animation-name: expandUp;
-webkit-animation-name: expandUp;
animation-duration: 0.7s;
-webkit-animation-duration: 0.7s;
animation-timing-function: ease;
-webkit-animation-timing-function: ease;
visibility: visible !important;
}
@keyframes expandUp {
0% {
transform: translateY(100%) scale(0.6) scaleY(0.5);
}
60%{
transform: translateY(-7%) scaleY(1.12);
}
75%{
transform: translateY(3%);
}
100% {
transform: translateY(0%) scale(1) scaleY(1);
}
}
@-webkit-keyframes expandUp {
0% {
-webkit-transform: translateY(100%) scale(0.6) scaleY(0.5);
}
60%{
-webkit-transform: translateY(-7%) scaleY(1.12);
}
75%{
-webkit-transform: translateY(3%);
}
100% {
-webkit-transform: translateY(0%) scale(1) scaleY(1);
}
}
/*
==============================================
fadeIn
==============================================
*/
.fadeIn{
animation-name: fadeIn;
-webkit-animation-name: fadeIn;
animation-duration: 1.5s;
-webkit-animation-duration: 1.5s;
animation-timing-function: ease-in-out;
-webkit-animation-timing-function: ease-in-out;
visibility: visible !important;
}
@keyframes fadeIn {
0% {
transform: scale(0);
opacity: 0.0;
}
60% {
transform: scale(1.1);
}
80% {
transform: scale(0.9);
opacity: 1;
}
100% {
transform: scale(1);
opacity: 1;
}
}
@-webkit-keyframes fadeIn {
0% {
-webkit-transform: scale(0);
opacity: 0.0;
}
60% {
-webkit-transform: scale(1.1);
}
80% {
-webkit-transform: scale(0.9);
opacity: 1;
}
100% {
-webkit-transform: scale(1);
opacity: 1;
}
}
/*
==============================================
expandOpen
==============================================
*/
.expandOpen{
animation-name: expandOpen;
-webkit-animation-name: expandOpen;
animation-duration: 1.2s;
-webkit-animation-duration: 1.2s;
animation-timing-function: ease-out;
-webkit-animation-timing-function: ease-out;
visibility: visible !important;
}
@keyframes expandOpen {
0% {
transform: scale(1.8);
}
50% {
transform: scale(0.95);
}
80% {
transform: scale(1.05);
}
90% {
transform: scale(0.98);
}
100% {
transform: scale(1);
}
}
@-webkit-keyframes expandOpen {
0% {
-webkit-transform: scale(1.8);
}
50% {
-webkit-transform: scale(0.95);
}
80% {
-webkit-transform: scale(1.05);
}
90% {
-webkit-transform: scale(0.98);
}
100% {
-webkit-transform: scale(1);
}
}
/*
==============================================
bigEntrance
==============================================
*/
.bigEntrance{
animation-name: bigEntrance;
-webkit-animation-name: bigEntrance;
animation-duration: 1.6s;
-webkit-animation-duration: 1.6s;
animation-timing-function: ease-out;
-webkit-animation-timing-function: ease-out;
visibility: visible !important;
}
@keyframes bigEntrance {
0% {
transform: scale(0.3) rotate(6deg) translateX(-30%) translateY(30%);
opacity: 0.2;
}
30% {
transform: scale(1.03) rotate(-2deg) translateX(2%) translateY(-2%);
opacity: 1;
}
45% {
transform: scale(0.98) rotate(1deg) translateX(0%) translateY(0%);
opacity: 1;
}
60% {
transform: scale(1.01) rotate(-1deg) translateX(0%) translateY(0%);
opacity: 1;
}
75% {
transform: scale(0.99) rotate(1deg) translateX(0%) translateY(0%);
opacity: 1;
}
90% {
transform: scale(1.01) rotate(0deg) translateX(0%) translateY(0%);
opacity: 1;
}
100% {
transform: scale(1) rotate(0deg) translateX(0%) translateY(0%);
opacity: 1;
}
}
@-webkit-keyframes bigEntrance {
0% {
-webkit-transform: scale(0.3) rotate(6deg) translateX(-30%) translateY(30%);
opacity: 0.2;
}
30% {
-webkit-transform: scale(1.03) rotate(-2deg) translateX(2%) translateY(-2%);
opacity: 1;
}
45% {
-webkit-transform: scale(0.98) rotate(1deg) translateX(0%) translateY(0%);
opacity: 1;
}
60% {
-webkit-transform: scale(1.01) rotate(-1deg) translateX(0%) translateY(0%);
opacity: 1;
}
75% {
-webkit-transform: scale(0.99) rotate(1deg) translateX(0%) translateY(0%);
opacity: 1;
}
90% {
-webkit-transform: scale(1.01) rotate(0deg) translateX(0%) translateY(0%);
opacity: 1;
}
100% {
-webkit-transform: scale(1) rotate(0deg) translateX(0%) translateY(0%);
opacity: 1;
}
}
/*
==============================================
hatch
==============================================
*/
.hatch{
animation-name: hatch;
-webkit-animation-name: hatch;
animation-duration: 2s;
-webkit-animation-duration: 2s;
animation-timing-function: ease-in-out;
-webkit-animation-timing-function: ease-in-out;
transform-origin: 50% 100%;
-ms-transform-origin: 50% 100%;
-webkit-transform-origin: 50% 100%;
visibility: visible !important;
}
@keyframes hatch {
0% {
transform: rotate(0deg) scaleY(0.6);
}
20% {
transform: rotate(-2deg) scaleY(1.05);
}
35% {
transform: rotate(2deg) scaleY(1);
}
50% {
transform: rotate(-2deg);
}
65% {
transform: rotate(1deg);
}
80% {
transform: rotate(-1deg);
}
100% {
transform: rotate(0deg);
}
}
@-webkit-keyframes hatch {
0% {
-webkit-transform: rotate(0deg) scaleY(0.6);
}
20% {
-webkit-transform: rotate(-2deg) scaleY(1.05);
}
35% {
-webkit-transform: rotate(2deg) scaleY(1);
}
50% {
-webkit-transform: rotate(-2deg);
}
65% {
-webkit-transform: rotate(1deg);
}
80% {
-webkit-transform: rotate(-1deg);
}
100% {
-webkit-transform: rotate(0deg);
}
}
/*
==============================================
bounce
==============================================
*/
.bounce{
animation-name: bounce;
-webkit-animation-name: bounce;
animation-duration: 1.6s;
-webkit-animation-duration: 1.6s;
animation-timing-function: ease;
-webkit-animation-timing-function: ease;
transform-origin: 50% 100%;
-ms-transform-origin: 50% 100%;
-webkit-transform-origin: 50% 100%;
}
@keyframes bounce {
0% {
transform: translateY(0%) scaleY(0.6);
}
60%{
transform: translateY(-100%) scaleY(1.1);
}
70%{
transform: translateY(0%) scaleY(0.95) scaleX(1.05);
}
80%{
transform: translateY(0%) scaleY(1.05) scaleX(1);
}
90%{
transform: translateY(0%) scaleY(0.95) scaleX(1);
}
100%{
transform: translateY(0%) scaleY(1) scaleX(1);
}
}
@-webkit-keyframes bounce {
0% {
-webkit-transform: translateY(0%) scaleY(0.6);
}
60%{
-webkit-transform: translateY(-100%) scaleY(1.1);
}
70%{
-webkit-transform: translateY(0%) scaleY(0.95) scaleX(1.05);
}
80%{
-webkit-transform: translateY(0%) scaleY(1.05) scaleX(1);
}
90%{
-webkit-transform: translateY(0%) scaleY(0.95) scaleX(1);
}
100%{
-webkit-transform: translateY(0%) scaleY(1) scaleX(1);
}
}
/*
==============================================
pulse
==============================================
*/
.pulse{
animation-name: pulse;
-webkit-animation-name: pulse;
animation-duration: 1.5s;
-webkit-animation-duration: 1.5s;
animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
}
@keyframes pulse {
0% {
transform: scale(0.9);
opacity: 0.7;
}
50% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0.9);
opacity: 0.7;
}
}
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(0.95);
opacity: 0.7;
}
50% {
-webkit-transform: scale(1);
opacity: 1;
}
100% {
-webkit-transform: scale(0.95);
opacity: 0.7;
}
}
/*
==============================================
floating
==============================================
*/
.floating{
animation-name: floating;
-webkit-animation-name: floating;
animation-duration: 1.5s;
-webkit-animation-duration: 1.5s;
animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
}
@keyframes floating {
0% {
transform: translateY(0%);
}
50% {
transform: translateY(8%);
}
100% {
transform: translateY(0%);
}
}
@-webkit-keyframes floating {
0% {
-webkit-transform: translateY(0%);
}
50% {
-webkit-transform: translateY(8%);
}
100% {
-webkit-transform: translateY(0%);
}
}
/*
==============================================
tossing
==============================================
*/
.tossing{
animation-name: tossing;
-webkit-animation-name: tossing;
animation-duration: 2.5s;
-webkit-animation-duration: 2.5s;
animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
}
@keyframes tossing {
0% {
transform: rotate(-4deg);
}
50% {
transform: rotate(4deg);
}
100% {
transform: rotate(-4deg);
}
}
@-webkit-keyframes tossing {
0% {
-webkit-transform: rotate(-4deg);
}
50% {
-webkit-transform: rotate(4deg);
}
100% {
-webkit-transform: rotate(-4deg);
}
}
/*
==============================================
pullUp
==============================================
*/
.pullUp{
animation-name: pullUp;
-webkit-animation-name: pullUp;
animation-duration: 1.1s;
-webkit-animation-duration: 1.1s;
animation-timing-function: ease-out;
-webkit-animation-timing-function: ease-out;
transform-origin: 50% 100%;
-ms-transform-origin: 50% 100%;
-webkit-transform-origin: 50% 100%;
}
@keyframes pullUp {
0% {
transform: scaleY(0.1);
}
40% {
transform: scaleY(1.02);
}
60% {
transform: scaleY(0.98);
}
80% {
transform: scaleY(1.01);
}
100% {
transform: scaleY(0.98);
}
80% {
transform: scaleY(1.01);
}
100% {
transform: scaleY(1);
}
}
@-webkit-keyframes pullUp {
0% {
-webkit-transform: scaleY(0.1);
}
40% {
-webkit-transform: scaleY(1.02);
}
60% {
-webkit-transform: scaleY(0.98);
}
80% {
-webkit-transform: scaleY(1.01);
}
100% {
-webkit-transform: scaleY(0.98);
}
80% {
-webkit-transform: scaleY(1.01);
}
100% {
-webkit-transform: scaleY(1);
}
}
/*
==============================================
pullDown
==============================================
*/
.pullDown{
animation-name: pullDown;
-webkit-animation-name: pullDown;
animation-duration: 1.1s;
-webkit-animation-duration: 1.1s;
animation-timing-function: ease-out;
-webkit-animation-timing-function: ease-out;
transform-origin: 50% 0%;
-ms-transform-origin: 50% 0%;
-webkit-transform-origin: 50% 0%;
}
@keyframes pullDown {
0% {
transform: scaleY(0.1);
}
40% {
transform: scaleY(1.02);
}
60% {
transform: scaleY(0.98);
}
80% {
transform: scaleY(1.01);
}
100% {
transform: scaleY(0.98);
}
80% {
transform: scaleY(1.01);
}
100% {
transform: scaleY(1);
}
}
@-webkit-keyframes pullDown {
0% {
-webkit-transform: scaleY(0.1);
}
40% {
-webkit-transform: scaleY(1.02);
}
60% {
-webkit-transform: scaleY(0.98);
}
80% {
-webkit-transform: scaleY(1.01);
}
100% {
-webkit-transform: scaleY(0.98);
}
80% {
-webkit-transform: scaleY(1.01);
}
100% {
-webkit-transform: scaleY(1);
}
}
/*
==============================================
stretchLeft
==============================================
*/
.stretchLeft{
animation-name: stretchLeft;
-webkit-animation-name: stretchLeft;
animation-duration: 1.5s;
-webkit-animation-duration: 1.5s;
animation-timing-function: ease-out;
-webkit-animation-timing-function: ease-out;
transform-origin: 100% 0%;
-ms-transform-origin: 100% 0%;
-webkit-transform-origin: 100% 0%;
}
@keyframes stretchLeft {
0% {
transform: scaleX(0.3);
}
40% {
transform: scaleX(1.02);
}
60% {
transform: scaleX(0.98);
}
80% {
transform: scaleX(1.01);
}
100% {
transform: scaleX(0.98);
}
80% {
transform: scaleX(1.01);
}
100% {
transform: scaleX(1);
}
}
@-webkit-keyframes stretchLeft {
0% {
-webkit-transform: scaleX(0.3);
}
40% {
-webkit-transform: scaleX(1.02);
}
60% {
-webkit-transform: scaleX(0.98);
}
80% {
-webkit-transform: scaleX(1.01);
}
100% {
-webkit-transform: scaleX(0.98);
}
80% {
-webkit-transform: scaleX(1.01);
}
100% {
-webkit-transform: scaleX(1);
}
}
/*
==============================================
stretchRight
==============================================
*/
.stretchRight{
animation-name: stretchRight;
-webkit-animation-name: stretchRight;
animation-duration: 1.5s;
-webkit-animation-duration: 1.5s;
animation-timing-function: ease-out;
-webkit-animation-timing-function: ease-out;
transform-origin: 0% 0%;
-ms-transform-origin: 0% 0%;
-webkit-transform-origin: 0% 0%;
}
@keyframes stretchRight {
0% {
transform: scaleX(0.3);
}
40% {
transform: scaleX(1.02);
}
60% {
transform: scaleX(0.98);
}
80% {
transform: scaleX(1.01);
}
100% {
transform: scaleX(0.98);
}
80% {
transform: scaleX(1.01);
}
100% {
transform: scaleX(1);
}
}
@-webkit-keyframes stretchRight {
0% {
-webkit-transform: scaleX(0.3);
}
40% {
-webkit-transform: scaleX(1.02);
}
60% {
-webkit-transform: scaleX(0.98);
}
80% {
-webkit-transform: scaleX(1.01);
}
100% {
-webkit-transform: scaleX(0.98);
}
80% {
-webkit-transform: scaleX(1.01);
}
100% {
-webkit-transform: scaleX(1);
}
}
@moseskamau338
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment