Uploaded September 2022 | Updated September 2026, 2 weeks ago
The svg viewBox and viewport work together to give you control over what parts of your svg are visible. It's imperative to know how these work when embedding and svg in an html document. I'll give you a gentle walkthrough and even show you how to animate the svg viewBox with GreenSock. GSAP can animate it like any other attribute.
Check out my comprehensive GreenSock training
creativecodingclub.com/bundles/creative-coding-clubs?src=viewBox
ViewBox Demo
codepen.io/snorkltv/pen/xxjqEvj
SVG background generator
codepen.io/snorkltv/pen/JjvyKPZ
The svg viewBox and viewport work together to give you control over what parts of your svg are visible. It's imperative to know how these work when embedding and svg in an html document. I'll give you a gentle walkthrough and even show you how to animate the svg viewBox with GreenSock. GSAP can animate it like any other attribute.
Check out my comprehensive GreenSock training
creativecodingclub.com/bundles/creative-coding-clubs?src=viewBox
ViewBox Demo
codepen.io/snorkltv/pen/xxjqEvj
SVG background generator
codepen.io/snorkltv/pen/JjvyKPZ










