Warning: mkdir(): No space left on device in /var/www/tgoop/post.php on line 37

Warning: file_put_contents(aCache/aDaily/post/frontend_1/--): Failed to open stream: No such file or directory in /var/www/tgoop/post.php on line 50
Frontend разработчик@frontend_1 P.3972
FRONTEND_1 Telegram 3972
🧩 Трюк с z-index, о котором часто забывают

Если у вас не работает z-index — причина может быть не в его значении, а в контексте наложения (stacking context).

❗️Вот что его создаёт (неочевидное):

* position: fixed | absolute | relative + z-index ≠ auto
* transform, filter, perspective, opacity < 1
* will-change, mix-blend-mode, contain: layout и другие

📦 Пример:


.parent {
transform: translateZ(0); /* создаёт stacking context */
z-index: 10;
}

.child {
position: absolute;
z-index: 999; /* но не выйдет за пределы .parent */
}


🧠 Вывод: z-index работает только внутри текущего контекста наложения. Чтобы перекрыть что-то выше — нужно изменить контекст.

📚 Подробнее: https://developer.mozilla.org/ru/docs/Web/CSS/CSS_positioned_layout/Stacking_context

👉 @frontend_1
👍11



tgoop.com/frontend_1/3972
Create:
Last Update:

🧩 Трюк с z-index, о котором часто забывают

Если у вас не работает z-index — причина может быть не в его значении, а в контексте наложения (stacking context).

❗️Вот что его создаёт (неочевидное):

* position: fixed | absolute | relative + z-index ≠ auto
* transform, filter, perspective, opacity < 1
* will-change, mix-blend-mode, contain: layout и другие

📦 Пример:


.parent {
transform: translateZ(0); /* создаёт stacking context */
z-index: 10;
}

.child {
position: absolute;
z-index: 999; /* но не выйдет за пределы .parent */
}


🧠 Вывод: z-index работает только внутри текущего контекста наложения. Чтобы перекрыть что-то выше — нужно изменить контекст.

📚 Подробнее: https://developer.mozilla.org/ru/docs/Web/CSS/CSS_positioned_layout/Stacking_context

👉 @frontend_1

BY Frontend разработчик


Share with your friend now:
tgoop.com/frontend_1/3972

View MORE
Open in Telegram


Telegram News

Date: |

Telegram users themselves will be able to flag and report potentially false content. 3How to create a Telegram channel? The visual aspect of channels is very critical. In fact, design is the first thing that a potential subscriber pays attention to, even though unconsciously. Image: Telegram. Public channels are public to the internet, regardless of whether or not they are subscribed. A public channel is displayed in search results and has a short address (link).
from us


Telegram Frontend разработчик
FROM American