I was browsing a website and got the point to make a text gradient color, it's just a simple post.
for HTML text
<h1> Hello World </h1>
and CSS
h1{
background: linear-gradient(red 30%, green, blue) center/cover no-repeat;
color: white;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
2 new css property is
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
Thanks.
Top comments (0)