Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to set horizontal gradient to text via CSS? (left letter one colour, right - another colour) [duplicate]

Tags:

text

css

gradient

Is it possible to set horizontal gradient to text via CSS? (left letter one colour, right - another colour).

like image 805
Roman Gryndii Avatar asked Oct 05 '16 21:10

Roman Gryndii


1 Answers

Yes, it is.

h1 {
  font-size: 72px;
   background: -webkit-linear-gradient(left, red , yellow);
   background: -o-linear-gradient(right, red, yellow);
   background: -moz-linear-gradient(right, red, yellow);
   background: linear-gradient(to right, red , yellow); 
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
<h1>Hello World</h1>
like image 122
kind user Avatar answered Oct 18 '22 16:10

kind user