- Set a linear gradient background for the text.
- Set -webkit-background-clip to text.
- Set the original text color to transparent.
Example:
.some-text {
background-image: linear-gradient(to right, red, orange, yellow, green, blue, purple);
-webkit-background-clip: text;
color: transparent;
}
Top comments (1)
Cool snippet.