Posted By

Nettuts on 03/02/11


Tagged


Versions (?)

Who likes this?

22 people have marked this snippet as a favorite

cplusplus
lilumi
sethetter
polly42
mdjamal
shalomfriss
jmillersnipplr
laurentzziu
to-ny
Hollgam
logik42
yoitsben
o0110o
lookingforsome
mrtess
adambundy
misnoul
trancecoder
Priestd09
yusege
nellynette
Internet-Uzver


Pure CSS Text Gradients


 / Published in: CSS
 

  1. /* CSS text gradients */
  2. h2[data-text] {
  3. position: relative;
  4. }
  5. h2[data-text]::after {
  6. content: attr(data-text);
  7. z-index: 10;
  8. color: #e3e3e3;
  9. position: absolute;
  10. top: 0;
  11. left: 0;
  12. -webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0)), color-stop(50%, rgba(0,0,0,1)), to(rgba(0,0,0,0)));

Report this snippet  

You need to login to post a comment.