How to use fading text and CTA for content block?

Viewed 21

I don't want people to have access to read the entire story on my blog unless they subscribe and become members. I'd want readers to read only a few lines of the article before it fades with a CTA, similar to the fading text feature seen below.

What is the code of this fading text and CTA in the image. Click to view image][1]

1 Answers

If you do it in back-end then I suggest using ejs. You could then check if user is authenticated and depending on the answer render rest of your blog's content. And fading is just a simple css effect, probably ::before with background image set to gradient from white to transparent.

Related