HTML and CSS Reference
In-Depth Information
Figure 7.2. Wilson is capable of changing to any size at will, and you can edit him in a graphical editing program
like Illustrator. No JavaScript is required to create him, only SVG tags and a little bit of CSS.
Look at our first listing, where you can see that Wilson is composed entirely of XML data.
Drop the code for Wilson into a file called wilson.svg and open it in any modern browser
to see its smooth edges and amazing ability to resize.
Listing 7.1. wilson.svg—SVG code sample
Creating Wilson's .svg file requires an XML declaration with specific attributes on an <s-
vg> tag. If you open Wilson's file in a browser and resize the window, you'll notice that
 
Search WWH ::




Custom Search