One block with two classes, how to do?

Hello gleiton from Brazil here, I would like to know if it is possible to put an image at the bottom of a block and then add a colored gradient with several colors, like in the image below, I tried to create two classes, but always one overlaps the other, how to do it ? thank you all.


Hi @gleitons

You use a pseudo class.

So say you put a class called .hero on the bloc.

You can then add another class to the class manager called .hero::before

You do not need to add this class to the canvas, just keep it in the class manager.

On .hero::before set the position to absolute and the edges to 0. Now set the Gradient BG, and your good to go. (don’t forget to apply transparency to the gradient or you wont see the image).

6 Likes

Wow, it worked really well, thank you very much, every day I learn but in this forum, thanks for the answer.

2 Likes