Es geht darum das erste Element mit einem speziellen Klassen-Wert (class="hinweis") anzusprechen.
Created
February 22, 2016 16:54
-
-
Save Perun/b55fa083f04d41a44957 to your computer and use it in GitHub Desktop.
Erste .klasse ansprechen
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
<div id="inhalt"> | |
<h3>Irgendeine Überschrift</h3> | |
<div> | |
<p>Textbox</p> | |
</div> | |
<p class="hinweis">Kleiner Absatz</p> | |
<p>Kleiner Absatz</p> | |
<p class="hinweis">Kleiner Absatz</p> | |
<p>Kleiner Absatz</p> | |
<p class="hinweis">Kleiner Absatz</p> | |
</div> |
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
.hinweis {background: #fdc; border: 1px solid #c50;} | |
.hinweis:first-of-type {background: #aef; border: 1px solid #08a;} | |
#inhalt > :first-child {background:#eee; border: 1px solid #ddd;} | |
h3, p {padding: .25rem;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment