css3-modsel-145b.xml (1521B)
1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <head> 3 <title>:nth-of-type() pseudo-class with hidden elements</title> 4 <style type="text/css"><![CDATA[ 5 line { display: block; } 6 [type~=odd] { background: lime ! important; } 7 line:nth-of-type(odd) { background: red; } 8 [hidden] { display: none; } 9 ]]></style> 10 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 11 <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found --> 12 <meta name="flags" content=" namespace" /> 13 </head> 14 <body> 15 <test xmlns="http://www.example.org/"> 16 <line type="odd">This line should be green.</line> 17 <line type="even">This line should be unstyled.</line> 18 <line type="odd" hidden="hidden">This line should be green.</line> 19 <line type="even">This line should be unstyled.</line> 20 <line type="odd">This line should be green.</line> 21 <line type="even">This line should be unstyled.</line> 22 <line type="odd">This line should be green.</line> 23 <line type="even" hidden="hidden">This line should be unstyled.</line> 24 <line type="odd">This line should be green.</line> 25 <line type="even">This line should be unstyled.</line> 26 <line type="odd">This line should be green.</line> 27 <line type="even" hidden="hidden">This line should be unstyled.</line> 28 <line type="odd" hidden="hidden">This line should be green.</line> 29 <line type="even">This line should be unstyled.</line> 30 <line type="odd">This line should be green.</line> 31 </test> 32 </body> 33 </html>