:nth-last-child()
The :nth-last-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n. 6.6.5.3. :nth-last-child() pseudo-class
Links about :nth-last-child()
Quantity Queries for CSS
In responsive design, we think a lot about space, especially in the context of screen sizes. But the amount of content or the number of elements is bound to affect space, too, just as unpredictably…
:nth-last-child()
The :nth-last-child() CSS pseudo-class matches elements based on their position among a group of siblings, counting from the end.
Code sample
li:nth-last-child(2n) {
border: 5px solid fuchsia;
}
Explore other pages
- grid-template-rows
Specifies named grid areas.
- select
A control for selecting amongst a set of options.
- button
A control allowing a user to trigger actions.
- scroll-margin
Represents outsets defining the scroll snap area that is used for snapping this box to the snapport.