O'Reilly logo

Sams Teach Yourself SVG in 24 Hours by Micah Laaker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

SVG allows for a variety of units of measurement, letting you code your documents according to your preferences. Although defaulting to user units (which equate to pixels on the computer screen) unless otherwise specified, SVG allows for variable dimensions for both object and document dimensions. By using percentages, your SVG content can scale in proportion to its container (most often the Web browser).

The viewBox attribute modifies how content is displayed within the SVG document's dimensions. viewBox can be used to alter the location of the top leftmost corner of the content's display, scale the content to match the dimension's of the display, or both.

Knowing the fundamentals of SVG document layout, you're now ready to begin drawing. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required