Skip to content

Instantly share code, notes, and snippets.

@Chrisedmo
Created February 22, 2013 12:08
Show Gist options
  • Save Chrisedmo/5013016 to your computer and use it in GitHub Desktop.
Save Chrisedmo/5013016 to your computer and use it in GitHub Desktop.
CSS3 gradients on text…
/**
* CSS3 gradients on text…
*/
h2[data-text] {
position: relative;
font-size: 20vh;
font-family: helvetica, sans-serif;
color: transparent;
}
h2[data-text]::after {
content: attr(data-text);
z-index: 10;
color: #e3e3e3;
position: absolute;
top: 0;
left: 0;
-webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.0)), to(rgba(0,0,0,1.0)));
<h2 data-text="CSS3 Shadow text FTW!">CSS3 Shadow text FTW!</h2>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment