Text with pattern the new way

October 4th, 2020

In the past the only way to to get colored text, like from an image or gradient was to use SVG.

Nowadays pure CSS is enough.

Although a prefix with -webkit- is still needed for Safari and Blink browsers.

.post-2027 h1{
background-image: linear-gradient(
90deg,
#7383c1 0%,
#bed876 50%,
#e0b384 100%
);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
width:max-content;
}

Leave a Reply