Animations on web pages can be created with the help of CSS animation property. Using animation, an element’s style can be changed. Some animation properties which can be used are as follows:
Multiple animations’ concept
There is a possibility to apply multiple animations by separating them using a comma and then declaring all the required animations on a selector.
There is a huge performance concern while animating most of the properties, so we must proceed cautiously before applying animation to any property. Here are a few combinations which can be safely animated:
- 1. transform: translate()
- 2. transform: scale()
- 3. transform: rotate()
- 4. opacity
A detailed description of the sub-properties of animation:
- animation-name: It declares the @keyframes’ names for manipulating.
- animation-duration: The time length required for completing one cycle of the animation.
- animation-timing-function: It establishes the curves for preset acceleration, like linear or ease.
- animation-delay: time gap between loading the element and starting the animation sequence.
- animation-direction: It sets the animation direction after the cycle.
- animation-iteration-count: It is the number of times of performing the animation.
- animation-fill-mode: It sets the values applied before or after the animation.
- animation-play-state:It is used to play or pause the animation.