문제

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>
도움이 되었습니까?

해결책

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

ul li:nth-child(6n+3)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top