美文网首页
纯文本渐变效果(存在兼容性问题)

纯文本渐变效果(存在兼容性问题)

作者: Tme_2439 | 来源:发表于2019-07-29 14:34 被阅读0次

    话不多说,都在代码里:

    
        // font-style: oblique; // 下划线
        letter-spacing: 3px;
        text-shadow: 3px 3px 6px gray;
    
        // ↓简写,其实是给background-image 设置为渐变色,不是 background-color
        background: linear-gradient(to right, red, blue); 
    
        //  ↓只留下文本的背景区域(存在严重的兼容问题)
        -webkit-background-clip: text;
    
        // ↓让文字为透明色,就是让后面背景色显示出来。
        color: transparent;  
    
    

    效果如下

    jgg.png

    相关文章

      网友评论

          本文标题:纯文本渐变效果(存在兼容性问题)

          本文链接:https://www.haomeiwen.com/subject/wlsbrctx.html