CSS animations tutorial: Difference between revisions
Jump to navigation
Jump to search
m (Daniel K. Schneider moved page CSS animation tutorial to CSS animations tutorial: is closer to the spec name) |
m (→Introduction) |
||
Line 22: | Line 22: | ||
== Introduction == | == Introduction == | ||
The CSS animations specification {{quotation|describes a way for authors to animate the values of CSS properties over time, using keyframes. The behavior of these keyframe animations can be controlled by specifying their duration, number of repeats, and repeating behavior.}} ([https://www.w3.org/TR/css-animations-1/ CSS Animations Level 1], W3C Working Draft, 30 November 2017). | |||
<source lang="CSS"> | <source lang="CSS"> |
Revision as of 16:16, 3 April 2018
- Learning goals
- Be able to create simple CSS transforms
- Prerequisites
- Level and target population
- Beginners
- Teaching materials
- Example text: ....
- Remarks
- This tutorial is intended for students in educational technology or any other field that is technology intensive. For people who need less, there exist many easy CSS tutorials on the web. This text is intended for students who also must learn principles and who are willing to learn CSS by doing a project, looking at CSS code and online reference manuals.
- Ideally, a teacher also should assign a text formatting task, during or before assigning this tutorial for reading).
Introduction
The CSS animations specification “describes a way for authors to animate the values of CSS properties over time, using keyframes. The behavior of these keyframe animations can be controlled by specifying their duration, number of repeats, and repeating behavior.” (CSS Animations Level 1, W3C Working Draft, 30 November 2017).
div {
-webkit-animation: mykeyframes 5s; /* Chrome, Safari, Opera */
animation: mykeyframes 5s;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes mykeyframes {
from {background: red;}
to {background: yellow;}
}
/* Standard syntax */
@keyframes mykeyframes {
from {background: blue;}
to {background: red;}
}
Links
- Official
- CSS Animations. As of Jan 2015 = W3C Working Draft 19 February 2013
- Other
- Using CSS animations (MDN)