Все файлы
    index.html
10
12
14
16
18
20
22
24
26
0
    0.5
    0.75
    1
    1.5
    100%
    400px
    800px
    1000px
    1500px

    What is :nth-child?

    :nth-child — is a pseudo-class that allows you to select elements by their sequence number. For example, you can select the fifth paragraph and apply the necessary styles to it, or select all even-numbered rows in a table and make it striped.

    In this tutorial, we will go through the mechanism of this selector in detail. Let’s start with the initial html markup. We will work with a regular list.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23