nth-child-of-complex-selector.html (797B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>:nth-child with complex selector list argument</title> 5 <link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> 6 <link rel="match" href="nth-child-of-complex-selector-ref.html"> 7 <style> 8 /* At least 4 pair of <p> above, can be overlapping. The other selectors of the list are useless. */ 9 p:nth-child(4n of html:root>body>p+p:not(empty), :not(*), p:not(p), span, .notthere) { 10 background-color: lime; 11 } 12 </style> 13 </head> 14 <body> 15 <p>This test the styling of paragraphs with :nth-child(An+B of selector). If the test succeed, paragraphs that say "green" should have a green background.</p> 16 <p>White</p> 17 <p>White</p> 18 <p>White</p> 19 <p>Green</p> 20 <p>White</p> 21 <p>White</p> 22 <p>White</p> 23 <p>Green</p> 24 </body> 25 </html>