Suppose you want to target every third list item in a list. Which CSS pseudo-class will you use?
- :every-third
- :nth-child(3n)
- :nth-item(3n)
- :third-child
To target every third list item in a list, you should use the :nth-child(3n) pseudo-class. This selects elements that are at positions that are multiples of 3 within their parent.
Loading...
Related Quiz
- To use a custom property in your styles, you reference it with the ________ syntax.
- You're creating a magazine-style layout with text flowing into multiple columns. As the viewport width increases, you want to add more columns while ensuring that each column does not exceed 250px in width. Which CSS properties would you adjust?
- For an element with position: sticky; to work, the parent container must have a defined ________.
- To delay the start of a transition, you'd use the ________ property.
- You want to design a heartbeat animation where a heart icon grows and shrinks continuously. How would you ensure the animation runs smoothly in both directions?