Myvideo

Guest

Login

What are SVG viewport and viewBox A beginners guide to SVG part 3

Uploaded By: Myvideo
1 view
0
0 votes
0

SVGs are strange. They have a lot of numbers and other strange stuff going on, and the viewBox can be really strange. But it’s not that bad really. To understand how the viewBox works though, the first thing we need to do is understand what the SVG viewport is. The viewport is sort of like our browser window. A website is larger than our browser window, which is why we have to scroll. SVGs are a bit like that too, we have a viewport that allows us to look at the SVG canvas. That viewport is the size of the SVG in our code, but the SVG canvas can be much larger! The SVG viewBox is different. This is what we use to zoom in and out and pan around. The viewport stays the same. Picture opening something in Photoshop, then zooming in and panning around. You aren’t changing the size of your Ph ... #Kevin_Powell #tutorial #html #css #SVG #svg_tutorial #svg_viewbox #svg_viewport #what_is_viewbox 20180704 TBYJ2V1jAlA

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later