My problem is when I make my picture darker the text in class .text
gets darker too, and I don't know how to avoid this.
I know one solution: to make .wrap
position:absolute
and class .text
make not in image
but this solution is unsuitable for me (like this).
Any other ideas?
This is the code that I have:
.wrap {
width: 100%;
background: #000 none repeat scroll 0% 0%;
}
.image {
background-image: url("https://pbs.twimg.com/profile_banners/1550273796/1372363601/1500x500");
background-size: cover;
opacity: 0.8;
height: 100vh;
max-height: 350px;
min-height: 200px;
}
.text {
color: #FFF;
font-weight: 900;
}
<div class="wrap">
<div class="image">
<div class="text">
<p>I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE
YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU</p>
</div>
</div>
</div>