3

How to make a gradient for text from color to color?

 .gradient {
     background: linear-gradient(to right, blue, green 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     font-size: 300%;
  }
<div class="gradient">COUNTRY</div>
Tsubasa
  • 1,389
  • 11
  • 21
WebSS
  • 63
  • 6

2 Answers2

1

Change your "green" color percentage like:

background: linear-gradient(to right, blue, green 10%)
snsakib
  • 1,062
  • 9
  • 14
1

I make some changes to your CSS.

          .gradient {
font-size: 72px;
      background: linear-gradient(to right, blue 10%, green 50%);
      background-image: linear-gradient(to right, blue 10%, green 50%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
}
<div class="gradient">COUNTRY</div>

You can try this code of CSS.

bhumin
  • 188
  • 2
  • 9