Skip to content

Instantly share code, notes, and snippets.

@vdrnn
Forked from LeaVerou/dabblet.css
Created February 11, 2013 16:17
Show Gist options
  • Save vdrnn/4755468 to your computer and use it in GitHub Desktop.
Save vdrnn/4755468 to your computer and use it in GitHub Desktop.
Text masking — The SVG way
/**
* Text masking — The SVG way
*/
svg {
width: 6em; height: 1.5em;
font: 900 500%/1.2 'Arial Black', sans-serif;
}
text { fill: url(#wood); }
<svg>
<defs>
<pattern id="wood" patternUnits="userSpaceOnUse" width="400" height="400" >
<image xlink:href="http://subtlepatterns.com/patterns/purty_wood.png" width="400" height="400" />
</pattern>
</defs>
<text y="1.2em">SVG rocks!</text>
</svg>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment