Created
November 8, 2012 13:26
-
-
Save basvasilich/4038799 to your computer and use it in GitHub Desktop.
самый распространенный: все потомки
This file contains hidden or 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
/* самый распространенный: все потомки */ | |
.parent .child | |
{ | |
aborder: solid 3px red | |
} | |
/* | |
все селекторы можно уточнять | |
именами элементов ol.parent li.child | |
*/ | |
ol.parent li.child | |
{ | |
aborder: solid 3px red | |
} | |
/* только child */ | |
.parent > .child | |
{ | |
aborder: solid 3px red | |
} | |
/* следующий за */ | |
.child03 + .child | |
{ | |
abackground: yellow | |
} | |
/* после */ | |
.child03 ~ .child | |
{ | |
abackground: yellow | |
} | |
This file contains hidden or 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
<ol class="parent"> | |
<li class="child child01">child</li> | |
<li class="child child02"> | |
child | |
<div class="descendant">descendant</div> | |
<div class="child">fake child</div> | |
<ul> | |
<li>sublist</li> | |
<li>sublist</li> | |
</ul> | |
</li> | |
<li class="child child03">child</li> | |
<li class="child child04">child</li> | |
<li class="child child05">child</li> | |
</ol> |
This file contains hidden or 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","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