Wie kann ich Kinder eines Elternteils in der Top -Navigation Stil (CSS Pseudo) anwenden? [Duplikat]HTML

HTML-Programmierer
Guest
 Wie kann ich Kinder eines Elternteils in der Top -Navigation Stil (CSS Pseudo) anwenden? [Duplikat]

Post by Guest »

Das Wort „Home“ in der oberen Navigation hat zwei verschiedene Farben: Rot und Blau. Wie kann ich die gelbe Farbe unter den folgenden Bedingungen für dieses Wort (Home) anwenden:

. topnav a:hover, .topnav a:active, .topnav a.active



Code: Select all



.topnav {
padding: 10px;
background: #EEEEEE;
}
.topnav a {
padding: 10px;
text-decoration: none;
color: gray;
text-shadow: 1px 1px 1px #BBBBBB;
}
.topnav a:hover, .topnav a:active, .topnav a.active {
color: yellow;
}





[url=index.php]Home[/url]
[url=about.php]About[/url]
[url=contact.php]Contact[/url]
[url=contact.php]FAQ[/url]


< /code>
< /div>
< /div>

Ich habe das Ergebnis mit dem folgenden Code nahe gekommen, aber ich möchte Es ist zusammen auf beide Teile zusammen zu gelten ( Zuhause, vollständig gelb < /strong>):

< /p>
< Br /> 



.topnav {
padding: 10px;
background: #EEEEEE;
}
.topnav a {
padding: 10px;
text-decoration: none;
color: gray;
text-shadow: 1px 1px 1px #BBBBBB;
}
.topnav a:hover, .topnav a:active, .topnav a.active {
color: yellow;
}
.topnav a > span:hover, .topnav a > span:active, .topnav a > span.active {
color: yellow !important;
}





[url=index.php]Home[/url]
[url=about.php]About[/url]
[url=contact.php]Contact[/url]
[url=contact.php]FAQ[/url]




Ich hoffe, ich konnte mir mein Problem erklären, vielen Dank und schätze deine Anleitung.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post