| <csstest def=":nth-last-of-type() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="31" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests"> |
| |
| <author>Daniel Glazman</author> |
| <cssrules>.red { background-color : red } |
| p:nth-last-of-type(3) { background-color : lime } |
| dl > :nth-last-of-type(3n+1) { background-color : lime } |
| </cssrules> |
| |
| <code> |
| <p class="red" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background</p> |
| <address xmlns="http://www.w3.org/1999/xhtml">But this address is here only to fill space in the dom..</address> |
| <p xmlns="http://www.w3.org/1999/xhtml">So does this paragraph !</p> |
| <p xmlns="http://www.w3.org/1999/xhtml">And so does this one too.</p> |
| <dl xmlns="http://www.w3.org/1999/xhtml"> |
| <dt>First definition term</dt> |
| <dd>First definition</dd> |
| <dt>Second definition term</dt> |
| <dd>Second definition</dd> |
| <dt class="red">Third definition term that should have green background</dt> |
| <dd class="red">Third definition that should have green background</dd> |
| <dt>Fourth definition term</dt> |
| <dd>Fourth definition</dd> |
| <dt>Fifth definition term</dt> |
| <dd>Fifth definition</dd> |
| <dt class="red">Sixth definition term that should have green background</dt> |
| <dd class="red">Sixth definition that should have green background</dd> |
| </dl> |
| </code> |
| |
| </csstest> |