Say you want to select the 7th up and to the 14th element of a set of elements. It’s possible, using this selector:
ol li:nth-child(n+7):nth-child(-n+14) {
background: lightpink;
}
See the Pen Selecting Ranges of Elements with CSS on CodePen.
(from 12 Little-Known CSS Facts (The Sequel))
Related: Quantity Queries for CSS →