You would expect that CSS would have a solution for this by now. π If you want pure CSS, I would use a linear gradient overlay as such:
The advantage here is that all the content is still there and you only need to apply a single CSS class.
You should totally add a live example of your code btw!
Good try (I like the effort you spent to make it CSS only) but has some cons to me.
P.S. Accepting your remark and will add a codepen demonstrating my approach. Thank you!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You would expect that CSS would have a solution for this by now. π
If you want pure CSS, I would use a linear gradient overlay as such:
The advantage here is that all the content is still there and you only need to apply a single CSS class.
You should totally add a live example of your code btw!
Good try (I like the effort you spent to make it CSS only) but has some cons to me.
P.S. Accepting your remark and will add a codepen demonstrating my approach. Thank you!