Skip to content

Instantly share code, notes, and snippets.

@tylergaw
Created March 28, 2012 02:24
Show Gist options
  • Save tylergaw/2222966 to your computer and use it in GitHub Desktop.
Save tylergaw/2222966 to your computer and use it in GitHub Desktop.
Untitled
body {
font-family: helvetica;
}
li:nth-last-child(-n + 4) {
opacity: 0.6;
}
li:nth-last-child(-n + 3) {
opacity: 0.4;
}
li:nth-last-child(-n + 2) {
opacity: 0.3;
}
li:nth-last-child(-n + 1) {
opacity: 0.08;
}
<h1>List Item Falloff with nth-last-child</h1>
<ol>
<li>This is item one bonehead</li>
<li>This is item two chrome-dome</li>
<li>This is item three dicknose</li>
<li>This is item D gooby</li>
<li>I lost count dolan, gooby plz</li>
<li>Item six, wanna do repeater?</li>
<li>I dunno, wanna do repeater?</li>
<li>Running out of things to put here</li>
<li>Wizards!</li>
<li>The Water Monster is right cat man</li>
</ol>
{"view":"split-vertical","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment