@Evhar

Нужно оптимизировать код css через селекторы?

Как оптимизировать код в css
.news__wrapper__item:nth-child(4),
.news__wrapper__item:nth-child(6),
.news__wrapper__item:nth-child(7),
.news__wrapper__item:nth-child(9),
.news__wrapper__item:nth-child(10),
.news__wrapper__item:nth-child(12),
.news__wrapper__item:nth-child(13),
.news__wrapper__item:nth-child(15),
.news__wrapper__item:nth-child(16),
.news__wrapper__item:nth-child(18),
.news__wrapper__item:nth-child(19),
.news__wrapper__item:nth-child(21),
.news__wrapper__item:nth-child(22),
.news__wrapper__item:nth-child(24) {
margin-top: -80px;
}

Чтобы далее это применялось к 25,27,28,30,31,33, и т.д
  • Вопрос задан
  • 57 просмотров
Пригласить эксперта
Ответы на вопрос 1
@UthvfyV
задайте этим всем
.news__wrapper__item:nth-child(4),
.news__wrapper__item:nth-child(6) ...
общий класс укажите ему margin-top: -80px;
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы