Easy CSS3 animations with Animate.css
Chapters
Animations with bare minimum CSS code using Animate.css
In previous section we discussed how CSS animations work and what is required to make them work. In this chapter we will discuss CSS animation framework called animate.css which you can get here http://daneden.github.io/animate.css/
Using animate.css is rather very simple.
Root class that would be used with element you want to animated is called .animated
Then you would pick any of the animation preset CSS class and add it to the element you are animating.
Lets start with our container element to which we will apply animations
Step 1
Download and add animate.css to your page
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.0/animate.min.css" type="text/css" />
Step 2
Pick an element to which you would like to apply animate.css animation, In our case lest just assume we picked the one below
<div>I will shake</div>
Step 3
Add animated class to above element
<div class="animated">I will shake</div>
This itself means nothing unless you add how would you like to see this element animated, so last step is to add preset animation class to above elements as shown in step 4
Step 4
We picked shake
from the drop down and add this next to animated
class
<div class="animated shake">I will shake</div>
Now refresh your page and see the magic.
Here is an how it will look
As you see how easy it is to use animate.css. In next chapter we will dive into some javascript magic to control when to animate.
Description
In this tutorial we will try to understand how to do CSS3 animations without much effort.
This tutorial is divided into four parts
- Key things to know about CSS3 animations
- Animations with bare minimum CSS3 code
- jQuery magic fire animation.css animation plus adding animation to element when it is visible on browser viewport
- Resources and conclusion
This tutorial will be followed by a quick quiz to check on your knowledge.
Environment
A computer with a code editor and an installed modern browser. This tutorial is not targeted at IE9 or below users/
Prerequisites
Basic understanding of HTML, jQuery and CSS.
Audience
Developers who want to learn how to apply pure CSS3 animation effects without any knowledge on this subject.
Learning Objectives
You will be introduced to CSS3 animations with keyframes
You will also use animation framework called animate.css
You will also learn how to apply CSS3 animation with help of jQuery
Author: Subject Coach
Added on: 3rd Dec 2014
You must be logged in as Student to ask a Question.
None just yet!