14

TRANSITIONS AND ANIMATIONS

Image

We often think of web pages as having three layers: content (HTML), presentation (CSS), and behavior (JavaScript), and the general understanding is that these layers should all be kept absolutely separate—don’t use presentational or behavioral rules in the content layer (in other words, no CSS or JavaScript inline in the markup). This separation is not quite as clear cut as it seems, however—for a start, CSS has always included some behavioral aspects (the :hover pseudo-class being a prime example).

This line between presentation and behavior was blurred even further when the WebKit developers introduced two new behavioral ...

Get The Book of CSS3, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.