Can I combine :nth-child() or :nth-of-type() with an arbitrary selector?
问题 Is there a way to select every nth child that matches (or does not match) an arbitrary selector ? For example, I want to select every odd table row, but within a subset of the rows: table.myClass tr.row:nth-child(odd) { ... } <table class="myClass"> <tr> <td>Row <tr class="row"> <!-- I want this --> <td>Row <tr class="row"> <td>Row <tr class="row"> <!-- And this --> <td>Row </table> But :nth-child() just seems to count all the tr elements regardless of whether or not they're of the "row"