0

I have a linear-gradient background; I am trying to make a text element color to "inherit" that linear-gradient background color while scrolling.

Look like this: https://i.stack.imgur.com/kYK4x.jpg

Note Because it is linear-gradient background, set the Text color to constant is not ok.

Assume my code structure looks like this

<LinearGradient>
   <Text id="textA">Hello World</Text>
</LinearGradient>

I already tried give the <Text> a style

#textA {
   color: transparent;
   background-color: white;
}

However, because the background-color is under the color, setting the color to transparent would only become white

is it possible to do similar to the image https://i.stack.imgur.com/kYK4x.jpg by using pure css? If not, is there any ways to achieve that?

Thank

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
user47103
  • 179
  • 1
  • 6
  • 17

0 Answers0