HTML and CSS Reference
In-Depth Information
Want more information on XLink?
Would you like to learn more about XLink? Check out Jakob Jenkov's tutorial, “SVG: a
Element” at .
Although you could draw your UFOs from scratch in SVG, you'll find it easier to use
<image> with XLink to import an .svg file. You can quickly resize imported .svg files and
create them with popular vector-editing programs such as Adobe Illustrator or Inkscape.
The only trick is that creating files in a visual editor requires you to save as .svg in the Save
As menu.
Before proceeding, make sure the mothership.svg and ufo.svg assets you retrieved from
Manning's website are in your root folder. Without these files, nothing will appear where
XLink images should be.
Step 5: Import existing SVG files via XLink
Create a player's ship using a <path> tag, by inserting the following code snippet into <g
id="screenWelcome"> . Notice that your path's d attribute contains a series of points
to create your ship's shape. Insert your new XLink images and path by appending the fol-
lowing listing inside <g id="screenWelcome"></g> .
Search WWH ::

Custom Search