Text 有可能将文字颜色更改为离子?上的线性渐变?

Text 有可能将文字颜色更改为离子?上的线性渐变?,text,colors,linear-gradients,ionic3,Text,Colors,Linear Gradients,Ionic3,我知道如何在背景中使用线性渐变颜色,但在文本的颜色中也可以这样做吗 谢谢您解决方案 .toolbar-title{ background: -webkit-linear-gradient(30deg,#4ba9fc,#31dab4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; //color: #fff; font-size: 3em; margin-

我知道如何在背景中使用线性渐变颜色,但在文本的颜色中也可以这样做吗

谢谢您

解决方案

 .toolbar-title{
    background: -webkit-linear-gradient(30deg,#4ba9fc,#31dab4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    //color: #fff;
    font-size: 3em;
    margin-top: 25px;
    text-align: center;
    font-family: "Lobster 1.4 Regular";

这解决了我的问题背景:-webkit线性梯度(50deg,#4ba9fc,#31dab4)-webkit背景剪辑:文本-webkit文本填充颜色:透明;