Make a div element move gradually 200px down:
![]()
The @keyframes rule is not supported in any browsers.
Firefox supports an alternative, the @-moz-keyframes rule.
Safari and Chrome support an alternative, the @-webkit-keyframes rule.
With the @keyframes rule, you can create animations.
The animation is created by gradually changing from one set of CSS styles to another.
During the animation, you can change the set of CSS styles many times.
Specify when the change will happen in percent, or the keywords "from" and
"to", which is the same as 0% and 100%.
0% is the beginning of the animation, 100% is when the animation is complete.
For best browser support, you should always define both the 0% and the 100%
selectors.
Note: Use the animation properties to control the appearance of the animation, and also to bind the animation to selectors.
| Value | Description |
|---|---|
| animationname | Required. Defines the name of the animation. |
| keyframes-selector | Required. Percentage of the animation duration. Legal values: 0-100% Note: You can have many keyframes-selectors in one animation. |
| css-styles | Required. One or more legal CSS style properties |
Add many keyframe selectors in one animation:
Change many CSS styles in one animation:
Many keyframe selectors with many CSS styles:
CSS3 tutorial: CSS3 Animations
Complete CSS Reference
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $3.98 Unlimited Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| Download XML Editor |
| FREE Website BUILDER |
| Best Website Templates Top CSS Templates |
| CREATE HTML Websites |
| EASY WEBSITE BUILDER |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|