Suppose there are several div 's on the page. With or without class. And there are several div with the class .class-name , whose position in the document is unknown. But you need to choose the first (or second, third, fourth ...) div with the class. Class .class-name from the total.
Can I do this with CSS?
I thought it would work with. .class-name:nth-of-type(n) . But in this case, you have to manually specify the position of the total number of all div 's. And I would like to indicate it based on the number of divs with the class. class-name .