Animating CSS Width and Height Without the Squish Effect
The first rule of animating on the web: don’t animate width
and height
. It forces the browser to recalculate a bunch of stuff and it’s slow (or “expensive” as they say). If you can get away with it, animating …