nth-last-child-of-nesting.html (703B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>:nth-last-child nesting</title> 5 <link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> 6 <link rel=author href="mailto:zach@zrhoffman.net" title="Zach Hoffman"> 7 <link rel="match" href="nth-child-of-nesting-ref.html"> 8 <style> 9 :nth-last-child(2n - 2 of :nth-last-child(n of .target)) { 10 background-color: lime; 11 } 12 </style> 13 </head> 14 <body> 15 <p>White</p> 16 <p class="target">Green</p> 17 <p>White</p> 18 <p class="target">White</p> 19 <p>White</p> 20 <p class="target">Green</p> 21 <p>White</p> 22 <p class="target">White</p> 23 <p>White</p> 24 <p class="target">Green</p> 25 <p>White</p> 26 <p class="target">White</p> 27 </body> 28 </html>