Created
June 5, 2012 11:51
-
-
Save nhoizey/2874547 to your computer and use it in GitHub Desktop.
SVG: <use> of an <image>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Live demo : http://bl.ocks.org/2874547 --> | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title><use> of an <image></title> | |
</head> | |
<body> | |
<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="board" viewBox="0 0 320 460" width="100%" height="100%" preserveAspectRatio="xMidYMid meet"> | |
<defs> | |
<image id="piece1" xlink:href="m1.svg" width="32" height="32" /> | |
<image id="piece2" xlink:href="m2.svg" width="32" height="32" /> | |
<image id="piece3" xlink:href="m3.svg" width="32" height="32" /> | |
</defs> | |
<g id="main"> | |
<use xlink:href="#piece1" x="0" y="0" /> | |
<use xlink:href="#piece2" x="32" y="0" /> | |
<use xlink:href="#piece3" x="64" y="0" /> | |
<use xlink:href="#piece2" x="0" y="32" /> | |
<use xlink:href="#piece3" x="32" y="32" /> | |
<use xlink:href="#piece1" x="64" y="32" /> | |
<use xlink:href="#piece3" x="0" y="64" /> | |
<use xlink:href="#piece1" x="32" y="64" /> | |
<use xlink:href="#piece2" x="64" y="64" /> | |
</g> | |
</svg> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment