Я попытался использовать диапазон в nth-чильде и nth-last , но не мог заставить его работать. />
Код: Выделить всё
.parent {
margin: 10px;
padding: 5px;
border: 1px solid black;
width: 70px;
}
.parent > div {
position: relative;
}
.parent > div:only-child::after,
.parent > div:not(:last-child)::after {
content: "";
display: block;
position: absolute;
right: 0px;
top: 7px;
width: 7px;
height: 7px;
margin-left: 5px;
background-color: blue;
}< /code>
one
two
three
one
Подробнее здесь: https://stackoverflow.com/questions/797 ... -the-first
Мобильная версия