Created
April 18, 2016 08:47
-
-
Save alanpilloud/34f0e887bb44671ed8749f6583ce7b4b to your computer and use it in GitHub Desktop.
<use> with SVG
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
<!-- | |
Make sure that the viewBox attributes are using the same values. | |
xlink:href should refer to the id of the <svg> and have a # sign before it. | |
--> | |
<div style="display:none"> | |
<svg id="mySVG" width="50" height="50" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">...</svg> | |
</div> | |
<svg viewBox="0 0 50 50"><use xlink:href="#mySVG"></use></svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment