ArticleslgStudy

computer science

CSS animations

CSS animations is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand CSS animations rather than just read about it. In short: CSS animations is a module for Cascading Style Sheets that allows the animation of HTML document elements using CSS. History While the pseudo-class :hover has been used to generate rudimentary animations for years, extensions of CSS into the realm of animation were minimal until the late 2000s.

CSS animations — main illustration
CSS animations — illustration

Key takeaways

  • CSS animations belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect CSS animations to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of CSS animations from memory before moving on to harder problems.

Reference excerpt

CSS animations is a module for Cascading Style Sheets that allows the animation of HTML document elements using CSS.

History While the pseudo-class :hover has been used to generate rudimentary animations for years, extensions of CSS into the realm of animation were minimal until the late 2000s. As early as 2007, WebKit had announced its intent to include CSS animation, transitions, and transforms as features of WebKit. It also announced the implementation of both implicit and explicit animation through CSS in February 2009. CSS animation has also been put forth as a feature of CSS3, the ongoing draft specification managed by the World Wide Web Consortium (W3C).

Current CSS Animations is a module of Cascading Style Sheets. It allows users to hover over objects and an animation will play. Currently, it is adopted by all major search engines. Despite the controversy from those who prefer animation via Javascript, the hover tag is now widely used across the Cascading Style Sheets community.

Scalable Vector Graphics

In addition to hover, Scalable Vector Graphics supports the @keyframes at-rule, allowing a limited set of transformations to be animated. Firefox and Chrome used the @-moz-keyframes and @-webkit-keyframes extensions, respectively, before @keyframes was added to the CSS 3 specification.

Browser support As of June 2011, Firefox 5 includes CSS animations support. CSS animation is also available as a module in the nightly builds of WebKit as well as Google Chrome, Safari 4 and 5 and Safari for iOS (iPhone, iPod Touch, iPad), Android versions 2.x and 3.x, Internet Explorer 10+ and Microsoft Edge browser, the BlackBerry OS 6 web browser, with the -webkit- prefix. It is also used in iTunes 9 to support iTunes LP files.

Controversy Early on in the development of the CSS animation it had drawn concern from those who prefer animation via JavaScript or, to a lesser-used extent, Synchronized Multimedia Integration Language (SMIL); others have claimed that it is a move by Apple Inc., the main sponsor of the WebKit project, to sidestep the inclusion of Adobe Flash (and the incumbent Flash animations) on the company's iOS line of mobile devices which use Safari. Furthermore, although Cascading Style Sheets is a relatively easy to use programming language, many programmers still struggle with making animations. With this problem, several individuals and websites have developed and created open source CSS button animations with code for users to copy. However, even with these previous controversies, CSS animations can be predominantly found and widely used across the internet.

See also Flash animation SVG animation

References

External links Initial Apple Proposal

Illustrations

CSS animations illustration
CSS animations: Animated SVG using CSS 3
Animated SVG using CSS 3

Worked examples

Example 1 — a first encounter with CSS animations

Start with the simplest possible case. Write down what CSS animations claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to CSS animations before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about CSS animations ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of CSS animations

In research
CSS animations appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses CSS animations in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
CSS animations is common in secondary-school and first-year university syllabi. It links to neighbouring topics Animation techniques, Apple Inc. software, Cascading Style Sheets, so understanding it makes those chapters shorter.
In everyday life
Look for CSS animations outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “CSS animations” →

How to study CSS animations in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what CSS animations means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain CSS animations out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is CSS animations in simple terms?

CSS animations is a module for Cascading Style Sheets that allows the animation of HTML document elements using CSS. History While the pseudo-class :hover has been used to generate rudimentary animations for years, extensions of CSS into the realm of animation were minimal until the late 2000s.

Why does CSS animations matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study CSS animations?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on CSS animations.

Tags

  • Animation techniques
  • Apple Inc. software
  • Cascading Style Sheets
  • Communication stubs
  • Design stubs

Keep exploring