Pergunta

How can I select every other 3rd element in an unordered list like below? I have a random amount of <li>'s but I need every other 3rd so for example the third, the ninth, the fifteenth, etc. is such a thing possible in html or css or javascript?

<ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    ...
</ul>
Foi útil?

Solução

You're actually looking to select every sixth element, but starting from the third:

ul li:nth-child(6n+3)
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top