效果图如下:

css字体颜色渐变(超简易)

总的来说还行,比较简单的代码

.font-color {
    background: linear-gradient(to top, #ffba31, #FFD392, #FDF7EE);
    -webkit-background-clip: text;
    color: transparent;
  }

linear-gradient的参数to top 控制后面的颜色顺序,从下往上渐变,当然你也可以让它从下往上渐变,to bottom 

主要就是后面那几个参数,你想怎么搭配怎么来,哈哈哈,可以玩一下

相关文章:

  • 2021-12-27
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2021-12-23
  • 2021-09-19
  • 2022-02-11
  • 2022-12-23
猜你喜欢
  • 2022-02-19
  • 2021-12-22
  • 2021-12-05
  • 2021-12-05
  • 2021-12-02
  • 2021-12-05
  • 2021-12-05
相关资源
相似解决方案