Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed SVG Workflow and Tools !
You have completed SVG Workflow and Tools !
Preview
The viewBox attribute of SVGs can be used to scale and control the position of an image within its viewport. This gives developers more power to customize how images appear.
Demo of footer navigation
Resources
Articles
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
If width and height values
are not given for an inline SVG,
0:00
it will default to either 300
pixels wide by 150 pixels tall.
0:04
Or the SVG will take up the entire
width and height available,
0:09
depending on the browser.
0:13
You've learned that a viewport is
the user's visible area of a web page
0:18
in the browser.
0:22
SVG also has a viewport.
0:24
It's similar to the viewport
of the browser.
0:26
By giving an SVG width and height values,
we can define its viewport.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up