Search code examples
csstextlinear-gradients

how to add multiple colors in background with linear gradient?


I am facing one problem with gradient color. I want to add gradient to text background but I don't know how can I add multiple color.

Can anyone please explain how to do this?.


Solution

  • h1{  
      font-size: 64px;
      background-image: linear-gradient(to right, #ba81cf, #6886d4);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }