V
V
Vadim Yagofarov2018-05-16 12:12:59
css
Vadim Yagofarov, 2018-05-16 12:12:59

How to make nested block with text not transparent?

There is a bootsrap 4 slider, it has a block inside it with a block with text. The parent box has the
background-image property set: linear-gradient(to top, #2c0a7a 0%, #e1405a 100%);
opacity: 0.72
As a result, the text and the button also become transparent, which is not necessary at all, please tell me how this can be avoided
5afbf49a51313846364001.jpeg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene Chefranov, 2018-05-16
@GIRUPC

background-image: linear-gradient(to top, rgba(44, 10, 122, 0.7) 0%, rgba(225, 64, 90, 0.7) 100%);

A
Alexander Lysenko, 2018-05-16
@LysenkoSasha

set color in rgba
rgba(255,0,0, 0 ) - where the last 0 is your opacity. Put 0.1 0.2 0.3 and up to 1
rgba(255,0,0, 0 )
in your case - 0.7

linear-gradient(to top, rgba(255,0,0,0.7), rgba(255,0,0,0.7));

D
Dmitry Goncharov, 2018-05-16
@mozart_dima

1) Make background with :before
2) Get rid of opacity by replacing it with rgba(...) for colors and translucent *.png for images.
3) a separate block (almost the same as :before)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question