Ich versuche, Brotkrumen zu erstellen, aber leider Z-Index funktioniert nicht.Ich versuchte höhere Werte sowie Vorrang mit! Wichtig. Hier ist mein Code:Z-Index für Pseudo-Element funktioniert nicht
li.breadcr {
width: 2em;
height: 2em;
text-align: center;
line-height: 2em;
border-radius: 1em;
background: #0095c4;
margin: 0 3em;
display: inline-block;
color: white;
position: relative;
z-index: 900000;
}
li.breadcr::before {
content: '' !important;
position: absolute !important;
top: .9em !important;
left: -8em !important;
width: 10em !important;
height: .2em !important;
background: #0095c4 !important;
z-index: -1 !important;
}
li.breadcr:first-child::before {
display: none !important;
}
.active {
background: #0095c4;
}
.active ~ li.breadcr {
background: #badae4 !important;
}
.active ~ li.breadcr::before {
background: #badae4 !important;
}
ul.sub {
list-style: none;
}
li.sub02 {
display: inline-block;
font-family: TeX Gyre Heros, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
}
<ul>
<li class="breadcr">1</li>
<li class="active breadcr">2</li>
<li class="breadcr">3</li>
</ul>
<ul class="sub">
<li class="sub02" style="margin-left: 25px;"><b>File or link</b>
</li>
<li class="sub02" style="margin-left: 53px;"><b>Category</b>
</li>
<li class="sub02" style="margin-left: 50px;"><b>Comments</b>
<li>
</ul>
Der Code auf separater HTML-Seite gearbeitet, aber wenn ich es mit neuer Website integriert, um die Linien vanished.What Werte für z-index funktionieren würden, so dass die Linien sind unten Kreise stattdessen oben? Alle Vorschläge werden sehr geschätzt. Vielen Dank im Voraus, Neko
Ich versuchte z-Index für ul und die Zeilen sind immer noch nicht sichtbar @Andy Tschiersh – Neko
Ich habe updatet meine Antwort. Die "ul" muss "position: relative" sein (oder absolut oder fest, aber nicht statisch) –
Ich habe relative Position hinzugefügt und die Linien sind immer noch über Kreise: https://ewelinawoloszyn.github.io/Form/index03. html @Andy Tschiersch – Neko