CSS3 Text Gradient Effect

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.