Created
May 31, 2013 20:03
-
-
Save SirPepe/5687601 to your computer and use it in GitHub Desktop.
Demo CSS-Pseudoklassen-Typen
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
/** | |
* Demo CSS-Pseudoklassen-Typen | |
*/ | |
/* :nth-child OHNE Element */ | |
/*#foo :nth-child(2n+1){ color: red; }*/ | |
/* :nth-child MIT Element */ | |
/*#foo span:nth-child(2n+1){ color: red; }*/ | |
/* :nth-of-type */ | |
/*#foo span:nth-of-type(2n+1){ color: red; }*/ |
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
<div id="foo"> | |
<span>Span</span> | |
<span>Span</span> | |
<div>Div</div> | |
<span>Span</span> | |
<div>Div</div> | |
<div>Div</div> | |
<span>Span</span> | |
<div>Div</div> | |
<span>Span</span> | |
<div>Div</div> | |
<span>Span</span> | |
<div>Div</div> | |
</div> | |
<style> | |
body { | |
padding-top: 3em; | |
} | |
#foo { | |
font-size: 1.2em; | |
line-height: 1.75; | |
} | |
#foo > * { | |
display: block; | |
} | |
</style> |
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
// alert('Hello world!'); |
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-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment