How does this effect come true?

how is this text gradient realized

Mar.06,2021

is actually put a div, background color gradient on it, which puts "View more"


there is a mask at the top of the display text, this mask is a gradient from top to bottom, from opaque to transparent, this is the effect, you can try it yourself.


should be a mask using a gradient background color


the simple thing is that the mask layer is pressed on the text text (the mask z-index is higher than the text text) to realize the background color gradient

.

 

clipboard.png
learn to use the browser to see the effect


provides a method that is compatible with IE9 (if you don't want to use pictures and don't need to be compatible with IE8 )

? although some Low

background-color: rgba(255, 255, 255, .5);

Why can't Demo: preview CodePen?

Menu