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> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="55" height="55" viewBox="-0.966 -0.696 55 55" enable-background="new -0.966 -0.696 55 55" xml:space="preserve"> | |
<path fill="#0C6EB7" d="M0,26.711C0,11.953,11.953,0,26.707,0s26.711,11.953,26.711,26.711c0,14.742-11.957,26.699-26.711,26.699 | |
S0,41.453,0,26.711"/> | |
<path fill="#FFFFFF" d="M36.133,39.574v-4.738h-11.68c0.367-1.641,3.211-4.008,4.652-5.328c3.41-3.098,6.496-5.297,6.496-10.148 | |
c0-5.77-4.684-8.578-9.656-8.578c-3.812,0-6.336,1.121-9.066,3.492l2.977,3.93c0.676-0.766,2.402-2.57,4.883-2.57 | |
c3.086,0,4.688,1.965,4.688,4.406c0,2.734-2.031,4.691-3.918,6.336c-3.777,3.289-7.023,6.172-7.742,9.469v3.73H36.133"/> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment