Hard stroke transparent text in CSS

I have an image as a background on my body (purple gradient view). There is some text in the middle of the page. I want the text to be transparent (i.e. display a purple gradient), but I want the 1px solid color stroke in the text to be visible.

text-shadow: 1px 0 red, -1px 0 red, 0 1px red, 0 -1px red;

      

doesn't work because if you make the text transparent you will see shadows.

color: rgba(0,0,0,0);

      

does not skip text and ...

opacity: 0;

      

the material also gives an opaque touch.

Any ideas? Is this only possible with CSS?

EDIT: I just read about text stroke. But can't find anything useful.

+3


source to share


1 answer


article h1 {
color: rgba(0, 0, 0, 0.2); 
-webkit-text-stroke: 1px black;

      



}

0


source







All Articles