CSS - Gradient text-shadow

后端 未结 1 1844
遥遥无期
遥遥无期 2021-01-20 00:04

I want to make a gradient text-shadow (like this)
Is it possible to do that with CSS or/and Javascript?
Thanks for help.

相关标签:
1条回答
  • 2021-01-20 00:29

    You can try it with a linear gradient, like in the example snippet below. Please note, that this does not work in Internet Explorer and Edge. I tested it successfully in Chrome, Firefox and Opera, and have no option to test it with Safari.

     div {
        font-size: 128px;
        background: linear-gradient(90deg, #ff0000 5%, #00B053 15%, #1BAADA 30%);
        -webkit-background-clip: text;
        -webkit-text-stroke: 12px transparent;
        color: #000; 
     } 
    <div>
       Text
    </div>

    0 讨论(0)
提交回复
热议问题