Up and Down animation – CSS3

As you people would know that it is now possible to make animation from CSS3 as well. And we can make some easy and simple animations with the help of CSS3.

Let us see some similar example in which you can animate any object or div below.

It is very easy. You just need to apply some properties of CSS3.
This code is also for those who are not technical. Just apply & enjoy 🙂


img.up-down{
    -webkit-animation: mover 1s infinite  alternate;
    animation: mover 1s infinite  alternate;
}
img.up-down{
    -webkit-animation: mover 1s infinite  alternate;
    animation: mover 1s infinite  alternate;
}
@-webkit-keyframes mover {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}
@keyframes mover {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

Example: