valentikus
@valentikus

Как правильно применить :not(:first-child)?

Всем привет! есть менюшка вот с такими стилями:

menu {
		text-align: justify;
		line-height: 0;
		padding: 0;
		margin-left: 30px;
		margin-right: 30px;
		&:after {
			width: 100%;
			height: 0;
			visibility: hidden;
			overflow: hidden;
			content: "";
			display: inline-block;
		}
		li {
			display: inline-block;
			text-align: left;
			padding: 5px 0;
			a {
				display: block;
				font-size: 18px;
				line-height: 1.3em;
				color: black;
				position: relative;
				text-transform: uppercase;
				&:hover{
				color: #c31e2f;
				}
				&:before  {
					top: 0;
					left: -15px;
					content: "\\\\";
					position: absolute;
					width: 5px;
					height: 5px;
					&:not(:first-child){}
				}
				&:hover {
					opacity: 0.8;
				}
			}
		}
	}


как правильно применить псевдоелемент :before ко всем кроме первого елемента?
  • Вопрос задан
  • 155 просмотров
Решения вопроса 1
werty1001
@werty1001
undefined
li {
  display: inline-block;
  text-align: left;
  padding: 5px 0;

  a {
    display: block;
    font-size: 18px;
    line-height: 1.3em;
    color: black;
    position: relative;
    text-transform: uppercase;
    &:hover{
      color: #c31e2f;
      opacity: 0.8;
    }
  }

  &:not(:first-child) a:before {
    top: 0;
    left: -15px;
    content: "\\\\";
    position: absolute;
    width: 5px;
    height: 5px;
  }

}
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

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

Войти через центр авторизации
Похожие вопросы
Grade Factor Москва
от 130 000 ₽
Spatium Software Каир
от 250 000 до 300 000 ₽
ITFB Group Самара
от 40 000 до 50 000 ₽
02 мая 2024, в 23:56
2000 руб./за проект
02 мая 2024, в 23:29
1500 руб./в час
02 мая 2024, в 23:16
7500 руб./за проект