https://codepen.io/anon/pen/veBQYy?editors=1100Z-Index funktioniert nicht
Ich habe ein div mit dem Klassenfilter. Dieses div soll das Hintergrundbild heller machen. Ich versuche, das div mit der Klasse innerlich auf den Filter zu setzen. Also habe ich z-Index: 9999 auf der inneren div aber es ist nicht an die Spitze
gehen
html, body {
height: 100%;
}
.outer {
display: table;
height: 100%;
width: 100%;
background: url('https://static.pexels.com/photos/56875/tree-dawn-nature-bucovina-56875.jpeg');
background-size: cover;
}
.middle {
display: table-cell;
width: 100%;
vertical-align: middle;
text-align: center; // Center everything in div
}
/* To dim background */
.filter {
position: absolute;
width: 100%;
height: 100%;
top: 0;
background-color: black;
opacity: 0.5;
}
/* This is not working. Z index not bringing it to the top */
.inner {
z-index: 9999;
}
h1 {
color: white;
}
<section class="outer">
<div class="middle">
<div class="filter"></div>
<div class="inner">
<h1>Need</h1>
<h1>This to go on top zindex 9999 not working</h1>
</div>
</div>
</section>
Dank, dass – Joa
Kein Problem gearbeitet, wenn es die Antwort, die Sie gesucht haben für Sie die Frage, wie die akzeptierte Antwort markieren – itodd