Implementation under Background-clip + Text-fill-color
If you have chrome or safari on hand, you can see something like this in the demo page:
<class= "text-gradient"> heavenly </h2>
CSS (the key useful in CSS code is actually the last three lines):
{ display: inline-block; color: green; font-size: 10em; ont-family: ´ Microsoft ya Black ´; background-image: -webkit-gradient (linear, 0 0, 0 bottom, from (Rgba (0, +, 0, 1)), to (Rgba (51, 51, (1))); -webkit-background-clip: text; -webkit-text-fill-color: transparent;} ;
Conclusion
Since the current Text-fill-color attribute seems to be WebKit Core browser support, two demo pages can only be seen in Chrome or Safari. Firefox browser under the solid color, ie, not to mention.
However, the text gradient itself is a decorative function, so in the progressive enhancement of the principle, we in the actual project can actually be used boldly. Without affecting the original function on the basis of a few lines of CSS code, so that the share of the more and more high-quality Chrome browser has a better visual experience, why not?
CSS3 Text Gradient Effect