关于字体渐变: 使用 background-cli、 text-fill-color:
.gradient-text-one{
background-image:-webkit-linear-gradient(bottom,red,#fd8403,yellow);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
说明 :
background: -webkit-linear-gradient(...) 为文本元素提供渐变背景。 webkit-text-fill-color: transparent 使用透明颜色填充文本。 webkit-background-clip: text 用文本剪辑背景,用渐变背景作为颜色填充文本。
正常dom渐变百分比
background-image: linear-gradient(to top, rgba(58,58,105,1) 50%, rgba(58,58,105,1), rgba(58,58,105,0));
纯色50%,剩余50%渐变