2017-05-28 3 views
0

aktives Element Stil ändern Ich möchte für aktives Element Stil ändern. Anstelle von Standard-grauen RandNavbar bootstrap3 - wie

enter image description here

möchte ich so etwas Bild hinzufügen.

enter image description here

Gibt es eine Möglichkeit für diese Art von Modifikation?

+0

Post Code paaren – comunit

Antwort

0

Ich bin nicht sicher, was Ihr Code wie folgt aussieht, aber Sie können wie diese

.navbar #nav > .active > a { 
    color: red; 
} 

oder zielen auf die Klasse oder id jedoch etwas tun wollen Sie

0

CSS Pseudo-Element ::before in aktiver Klasse hinzufügen.

Sie können Farbe und Position anpassen. Beispielcode unten.

a.nav-link.active::before { 
    content: ""; 
    height: 2px; 
    width: 10px; 
    background: #000; 
    left: 25px; 
    position: absolute; 
    top: 45px; 
}