user7965277
user7965277

Reputation:

CSS - Gradient text-shadow

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

Upvotes: 3

Views: 4048

Answers (1)

Matthias Seifert
Matthias Seifert

Reputation: 2073

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>

Upvotes: 5

Related Questions