Last active
February 9, 2017 13:43
-
-
Save Lego2012/0e72d9f0508b167f48647d11973afefe to your computer and use it in GitHub Desktop.
Geschwisterelemente 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
p ~ ul { | |
background-color: #f00; | |
} | |
/* | |
Geschwister-Elemente sind Elemente, die das gleiche Eltern-Element besitzen und somit sich auf einer Ebene befinden. Mit unserem Selektor werden alle Listen-Elemente selektiert, die sich nach dem p-Tag befinden und das gleiche Eltern-Element besitzen. Elemente die das gleiche Eltern-Element besitzen, jedoch vor dem p-Tag stehen, werden nicht selektiert und erhalten keinen roten Hintergrund. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment