Last active
February 9, 2017 13:43
-
-
Save Lego2012/2fdcb0a8808fd91fed36d29841f224f8 to your computer and use it in GitHub Desktop.
Erstes oder letztes Element von einem Typ selektieren
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
article:first-of-type, | |
article:last-of-type { | |
margin: 10px 0; | |
} | |
/* | |
Möchten wir von unserem Dokument das insgesamt erste oder letzte Element von einem Typ selektieren, können wir dafür die Pseudoklasse :first-of-type oder :last-of-type benutzen. In unserem Beispiel erhält das letzte und erste article-Element einen Abstand von 10px nach unten und oben. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment