: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
- data-
Stores data in a custom attribute.
- await
Used to wait for a Promise.
- clamp()
Takes three calculations—a minimum value, a central value, and a maximum value
- aria-describedby
Identifies the element (or elements) that describes the object.