Creating Gradient on Cover Blocks (background), without affecting text

[ad_1]

Hi everyone,

I would like to have a fading background with a text over (see picture).

To do so, I’ve write some CSS code that I’ve put on the “Cover” Block.

But as you can see, my paragrapg (text) is fading with the background. I would like to exclude the text from the gradient for it to be visible, fully black or white.

Is that possible ?

Thank you, Francis.

CSS I’ve used on the Cover block to fade the background :

.background {
-webkit-mask-image: -webkit-gradient(
linear,
left top,
left bottom,
from(rgba(0, 0, 0, 1)),
to(rgba(0, 0, 0, 0))
);
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer