-
-
Save FlorianX/7338517 to your computer and use it in GitHub Desktop.
Vorlage Selektor-Übung
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Vorlage Selektor-Übung | |
*/ | |
a { | |
color:#000; | |
text-decoration:none; | |
} | |
#navi > li:nth-child(odd) > a, | |
#navi > li > ul > li:nth-child(odd) > a{ | |
font-style:italic; | |
} | |
#navi > li:first-child a { | |
border-radius: 10px 0 0 10px; | |
} | |
#navi > li:last-child a { | |
border-radius: 0 10px 10px 0; | |
} | |
#navi > li:nth-child(4n+3) a, | |
#navi > li li:nth-child(4n+3) a{ | |
background-color:#aaa; | |
} | |
#navi > li:nth-child(2n+2) a, | |
#navi > li li:nth-child(2n+2) a{ | |
background-color:#ccc; | |
} | |
#navi > li:nth-child(4n+1) a, | |
#navi > li li:nth-child(4n+1) a{ | |
background-color:#eee; | |
} | |
#navi > li:nth-last-child(2) a{ | |
background-color:red; | |
} | |
#navi > li li:last-child a { | |
border-radius: 0 0 10px 10px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- content to be placed inside <body>…</body> --> | |
<ul id="navi"> | |
<li><a href="#">Startseite</a></li> | |
<li><a href="#">Über uns</a></li> | |
<li><a href="#">Philosophie</a></li> | |
<li><a href="#">Leistungen</a></li> | |
<li><a href="#">Unser Team</a> | |
<ul> | |
<li><a href="#">Rainer Zufall</a></li> | |
<li><a href="#">Claire Grube</a></li> | |
<li><a href="#">Armin Gips</a></li> | |
<li><a href="#">Anna Bolika</a></li> | |
<li><a href="#">Bill Yard</a></li> | |
<li><a href="#">Klaus Thaler</a></li> | |
<li><a href="#">Volker Putt</a></li> | |
</ul> | |
</li> | |
<li><a href="#">Shop</a></li> | |
<li><a href="#">Kontakt</a></li> | |
</ul> | |
<style> | |
html, body { | |
background: #FFF; | |
margin: 0; | |
padding: 0.5em; | |
} | |
ul { | |
font-size: 18px; | |
list-style: none; | |
float: left; | |
margin: 0; | |
padding: 0; | |
} | |
#navi > li { | |
position: relative; | |
float: left; | |
} | |
#navi > li a { | |
display: block; | |
padding: 8px 16px; | |
} | |
#navi > li ul { | |
position: absolute; | |
left: 0; | |
display: none; | |
width: 10em; | |
} | |
#navi > li:hover ul { | |
display: block; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment