text gradient

Hi, how can I have a text gradient?
I can do it for background, but not for text.
I have tried:
.gradient-text {
background: linear-gradient(45deg, #ff00ff, #00ffff);
color: transparent;
display: inline-block;
-webkit-background-clip: text;
background-clip: text;
mask-image: linear-gradient(45deg, #ff00ff, #00ffff);
}

but it's not working

Replies are visible only to logged in members with an active subscription.