Created
May 1, 2013 16:50
-
-
Save tsvensen/5496522 to your computer and use it in GitHub Desktop.
Colorize svg images with javascript using the file/browser path (js): http://elbone.github.io/cdn/codepen/icon.svg#FF0000
This file contains hidden or 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" x="0px" y="0px" | |
width="128px" height="96px" viewBox="0 0 128 96" enable-background="new 0 0 128 96" xml:space="preserve"> | |
<rect width="128" height="96"/> | |
<polygon fill="#FFFFFF" points="80,32.003 50,70 32,56 16,80 112,80 "/> | |
<circle fill="#FFFFFF" cx="28" cy="28" r="12"/> | |
<script>document.getElementsByTagName("rect")[0].setAttribute("fill", location.hash);</script> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment