When using Animation.css, I found that the font of its official website would change gradually. I took a look at its css and it was very interesting. .site__title { color: #f35626; background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; -webkit-animation: hue 60s infinite linear; } @-webkit-keyframes hue { from { -webkit-filter: hue-rotate(0deg); } to { -webkit-filter: hue-rotate(-360deg); } } Here we use -webkit-background-clip: text to crop the background image and leave only the text part. Then use -webkit-text-fill-color: transparent to set the text fill color to transparent Use hue animation to adjust the hue from 0deg to -360deg within 60s to achieve the effect of font color changing over time. This is the end of this article about how to use CSS3 to implement font color gradient. For more relevant CSS3 font color gradient content, please search 123WORDPRESS.COM’s previous articles or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! |
<<: React implements a general skeleton screen component example
>>: Sitemesh tutorial - page decoration technology principles and applications
MySQL is a relational database management system ...
Table of contents The relationship between the co...
Preface Currently, the front-end solves cross-dom...
1. HTML tags with attributes XML/HTML CodeCopy co...
I used Vue.js to make a nine-grid image display m...
Table of contents Let's talk about flattening...
Overview Indexing is a skill that must be mastere...
Links to the current page. ------------------- Com...
Effect principle Mainly use CSS gradient to achie...
We usually have a scanning box when we open the c...
Table of contents 1. Use object to create an obje...
1. View the types of fields in the table describe...
Related Documents Part of this article is referen...
There are obvious differences between volume moun...
Preface Normal business needs: upload pictures, E...