Smashing Animations Part 1: How Classic Cartoons Inspire Modern CSS<\/h1>\nAndy Clarke<\/address>\n 2025-05-07T08:00:00+00:00
\n 2025-05-07T20:02:52+00:00
\n <\/header>\n
Browser makers didn\u2019t take long to add the movement capabilities to CSS. The simple :hover<\/code> pseudo-class came first, and a bit later, the transition<\/code>s between two states. Then came the ability to change states across a set of @keyframes<\/code> and, most recently, scroll-driven animations that link keyframes to the scroll position.<\/p>\nEven with these added capabilities, CSS animations have remained relatively rudimentary<\/strong>. They remind me of the Hanna-Barbera<\/a> animated series I grew up watching on TV.<\/p>\nThese animated shorts lacked the budgets given to live-action or animated movies. They were also far lower than those available when William Hanna and Joseph Barbera made Tom and Jerry shorts while working for MGM Cartoons. This meant the animators needed to develop techniques to work around their cost restrictions and the technical limitations of the time.<\/p>\n
They used fewer frames per second and far fewer cells. Instead of using a different image for each frame, they repeated each one several times. They reused cells as frequently as possible by zooming and overlaying additional elements to construct a new scene. They kept bodies mainly static and overlayed eyes, mouths, and legs to create the illusion of talking and walking. Instead of reducing the quality of these cartoons, these constraints created a charm often lacking in more recent, bigger-budget, and technically advanced productions.<\/p>\n<\/p>\n <\/p>\n
<\/p>\n
<\/a>\n (Large preview<\/a>)
\n <\/figcaption><\/figure>\nThe simple and efficient techniques developed by Hanna-Barbera\u2019s animators can be implemented using CSS. Modern layout tools allow web developers to layer elements. Scaleable Vector Graphics (SVG) can contain several frames, and developers needn\u2019t resort to JavaScript; they can use CSS to change an element\u2019s opacity<\/code>, position<\/code>, and visibility<\/code>. But what are some reasons for doing this?<\/p>\nAnimations bring static experiences to life. They can improve usability<\/strong> by guiding people\u2019s actions and delighting or surprising them when interacting with a design. When carefully considered, animations can reinforce branding and help tell stories about a brand.<\/p>\n<\/p>\n <\/p>\n
<\/p>\n
<\/a>\n Design by Andy Clarke, Stuff & Nonsense. Mike Worth\u2019s website will launch in June 2025, but you can see examples from this article on CodePen. (Large preview<\/a>)
\n <\/figcaption><\/figure>\n\n
\n 2025-05-07T20:02:52+00:00
\n <\/header>\n
:hover<\/code> pseudo-class came first, and a bit later, the transition<\/code>s between two states. Then came the ability to change states across a set of @keyframes<\/code> and, most recently, scroll-driven animations that link keyframes to the scroll position.<\/p>\nEven with these added capabilities, CSS animations have remained relatively rudimentary<\/strong>. They remind me of the Hanna-Barbera<\/a> animated series I grew up watching on TV.<\/p>\nThese animated shorts lacked the budgets given to live-action or animated movies. They were also far lower than those available when William Hanna and Joseph Barbera made Tom and Jerry shorts while working for MGM Cartoons. This meant the animators needed to develop techniques to work around their cost restrictions and the technical limitations of the time.<\/p>\n
They used fewer frames per second and far fewer cells. Instead of using a different image for each frame, they repeated each one several times. They reused cells as frequently as possible by zooming and overlaying additional elements to construct a new scene. They kept bodies mainly static and overlayed eyes, mouths, and legs to create the illusion of talking and walking. Instead of reducing the quality of these cartoons, these constraints created a charm often lacking in more recent, bigger-budget, and technically advanced productions.<\/p>\n<\/p>\n <\/p>\n
<\/p>\n
<\/a>\n (Large preview<\/a>)
\n <\/figcaption><\/figure>\nThe simple and efficient techniques developed by Hanna-Barbera\u2019s animators can be implemented using CSS. Modern layout tools allow web developers to layer elements. Scaleable Vector Graphics (SVG) can contain several frames, and developers needn\u2019t resort to JavaScript; they can use CSS to change an element\u2019s opacity<\/code>, position<\/code>, and visibility<\/code>. But what are some reasons for doing this?<\/p>\nAnimations bring static experiences to life. They can improve usability<\/strong> by guiding people\u2019s actions and delighting or surprising them when interacting with a design. When carefully considered, animations can reinforce branding and help tell stories about a brand.<\/p>\n<\/p>\n <\/p>\n
<\/p>\n
<\/a>\n Design by Andy Clarke, Stuff & Nonsense. Mike Worth\u2019s website will launch in June 2025, but you can see examples from this article on CodePen. (Large preview<\/a>)
\n <\/figcaption><\/figure>\n\n