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

Creating Patterns

The pattern element allows you to define a graphic element (or group of elements) as a repeatable pattern. Rather than duplicating the element multiple times, the pattern element reduces the number of code lines needed to perform the same task. The savings are two-fold:

  • Your file is easier to manage and peruse

  • Your file size is dramatically reduced

Using a pattern requires a pattern element surrounding the content to be tiled. This element has several characteristics that define how the tiled content will be displayed. The x and y attributes determine the top left-most position of the first tiled object within the object using the tile. The width and height properties define the respective distances between the top left-most ...

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