效果圖如下:
總的來說還行,比較簡單的代碼
.font-color {
background: linear-gradient(to top, #ffba31, #FFD392, #FDF7EE);
-webkit-background-clip: text;
color: transparent;
}
linear-gradient的參數to top 控制後面的顏色順序,從下往上漸變,當然你也可以讓它從下往上漸變,to bottom
主要就是後面那幾個參數,你想怎麼搭配怎麼來,哈哈哈,可以玩一下