1
J'essaie de rendre l'image de fond à 70% d'opacité sans affecter le texte devant (dans la même div).Comment modifier l'opacité d'une image d'arrière-plan sans affecter les éléments enfants?
HTML
#home {
opacity: 0.7;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("...");
min-height: 100%;
overflow: hidden;
}
div .welcome {
background-size: cover;
vertical-align: middle;
text-align: center;
font-family: 'Lobster', cursive;
font-weight: 900;
font-size: 60px;
color: black;
margin: auto;
}
<div id="home" class="section">
<p class="welcome"><strong>Hello,<br>My name is Sean</strong></p>
</div>
double possible de [Comment appliquer une opacité sans affecter un élément enfant avec html/css? ] (http://stackoverflow.com/questions/10021302/how-to-apply-an-opacity-without-affecting-a-child-element-with-html-css) – Serlite
Ou alternativement [CSS background-image-opacity ?] (http://stackoverflow.com/questions/6890218/css-background-image-opacity) – Serlite