nth-last-child-of-ids.html (707B)
1 <!DOCTYPE html> 2 <meta charset="utf-8" /> 3 <title>CSS Selectors Invalidation: :nth-last-child(... of IDs)</title> 4 <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> 5 <link rel="match" href="nth-last-child-of-class-ref.html"> 6 <link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> 7 <style> 8 p:nth-last-child(even of #t1, #t2, #t3, #t4, #t5) { 9 color: green; 10 } 11 </style> 12 <div> 13 <p>Ignored</p> 14 <p id="t5">Not ignored</p> 15 <p id="t4">Not ignored</p> 16 <p id="t3">Not ignored</p> 17 <p id="t2">Selectively ignored</p> 18 <p id="t1">Not ignored</p> 19 <p>Ignored</p> 20 <p>Ignored</p> 21 </div> 22 <script> 23 document.documentElement.offsetTop; 24 t2.id = "new-id"; 25 </script>