Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aspirisen
Forked from LeaVerou/dabblet.css
Created May 8, 2015 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspirisen/7881db38400007eb2dea to your computer and use it in GitHub Desktop.
Save aspirisen/7881db38400007eb2dea 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="/Content/images/trainings/background-8.jpg" width="400" height="400" />
</pattern>
</defs>
<text y="1.2em">SVG rocks!</text>
</svg>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment