#200: Scroll to Zoom

Avatar of Chris Coyier
Chris Coyier on

Learn Development at Frontend Masters

Download Video
(Only MVP Supporters can download original high-quality recordings for offline viewing.)

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: