#200: Scroll to Zoom

Avatar of Chris Coyier
Chris Coyier on

DigitalOcean joining forces with CSS-Tricks! Special welcome offer: get $100 of free credit.

Fair warning: you aren’t going to need this every day! I just happened to be looking at a neat little SVG warping tool that had a feature where my mouse scroll wheel (or trackpad) could be used to zoom the working area in and out. We dug in to play with the idea, and it turns out it’s not terribly hard, thanks to the wheel DOM event and CSS transforms.

Here’s where we ended up: