Не работает псевдоэлемент before
не могу понять, почему не работает before, препроцессор sass
&__image
position: relative
transform: translate(50%, -50%)
&::before
content: ""
position: absolute
top: 0
left: 0
background-image: url(../img/1/music.png)
background-size: 136px
background-repeat: no-repeat
z-index: 10
<div class="page__screen screen">
<div
data-swiper-parallax="50%"
data-swiper-parallax-duration="1000"
class="screen__body icon icon-first"
>
<div class="icon-first-block">
<div class="icon-first-block__image">
<img src="img/1/logo.svg" alt="icon: Platano Fest" />
</div>
<div class="icon-first-block__btn">
<button class="button icon-first-block__button">
Купить билет
</button>
</div>
</div>
</div>
</div>
Ответы (1 шт):
Автор решения: Serdar Gurbanmyradow
→ Ссылка
Как по мне здесь не хватает ширины и высоты.
&__image
position: relative
transform: translate(50%, -50%)
&::before
content: ""
position: absolute
top: 0
left: 0
width: 100px
height: 100px
background-image: url(../img/1/music.png)
background-size: 136px
background-repeat: no-repeat
z-index: 10
<div class="page__screen screen">
<div
data-swiper-parallax="50%"
data-swiper-parallax-duration="1000"
class="screen__body icon icon-first"
>
<div class="icon-first-block">
<div class="icon-first-block__image">
<img src="img/1/logo.svg" alt="icon: Platano Fest" />
</div>
<div class="icon-first-block__btn">
<button class="button icon-first-block__button">
Купить билет
</button>
</div>
</div>
</div>
</div>