CSS animation example

by Christian Bonato

HTML

<div class="container">
    <div class="ball"></div>
</div>

CSS

@-moz-keyframes bouncing {
 40%,70%,90% {
    -moz-animation-timing-function: ease-out;
    bottom: 0;
 }
 0% {
    bottom: 200px;
    left: 0;
    -moz-animation-timing-function: ease-in;
 }
 55% {
    bottom: 50px;
    -moz-animation-timing-function: ease-in;
 }
 80% {
    bottom: 25px;
    -moz-animation-timing-function: ease-in;
 }
 95% {
    bottom: 10px;
    -moz-animation-timing-function: ease-in;
 }
 100% {
    left: 110px;
    bottom: 0;
    -moz-animation-timing-function: ease-out;
 }
}

@-webkit-keyframes bouncing {
 40%,70%,90% {
    bottom: 0;
    -webkit-animation-timing-function: ease-out;
 }
 0% {
    bottom: 200px;
    left: 0;
    -webkit-animation-timing-function: ease-in;
 }
 55% {
    bottom: 50px;
    -webkit-animation-timing-function: ease-in;
 }
 80% {
    bottom: 25px;
    -webkit-animation-timing-function: ease-in;
 }
 95% {
    bottom: 10px;
    -webkit-animation-timing-function: ease-in;
 }
 100% {
    left: 110px;
    bottom: 0;
    -webkit-animation-timing-function: ease-out;
 }
}

@-ms-keyframes bouncing {
 40%,70%,90% {
    bottom: 0;
    -ms-animation-timing-function: ease-out;
 }
 0% {
    bottom: 200px;
    left: 0;
    -ms-animation-timing-function: ease-in;
 }
 55% {
    bottom: 50px;
    -ms-animation-timing-function: ease-in;
 }
 80% {
    bottom: 25px;
    -ms-animation-timing-function: ease-in;
 }
 95% {
    bottom: 10px;
    -ms-animation-timing-function: ease-in;
 }
 100% {
    left: 110px;
    bottom: 0;
    -ms-animation-timing-function: ease-out;
 }
}

@keyframes bouncing {
 40%,70%,90% {
    bottom: 0;
    animation-timing-function: ease-out;
 }
 0% {
    bottom: 200px;
    left: 0;
    animation-timing-function: ease-in;
 }
 55% {
    bottom: 50px;
    animation-timing-function: ease-in;
 }
 80% {
    bottom: 25px;
    animation-timing-function: ease-in;
 }
 95% {
    bottom: 10px;
    animation-timing-function: ease-in;
 }
 100% {
    left: 110px;
    bottom: 0;
    animation-timing-function: ease-out;
...