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



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: |

The court said the defendant had also incited people to commit public nuisance, with messages calling on them to take part in rallies and demonstrations including at Hong Kong International Airport, to block roads and to paralyse the public transportation system. Various forms of protest promoted on the messaging platform included general strikes, lunchtime protests and silent sit-ins. Telegram iOS app: In the “Chats” tab, click the new message icon in the right upper corner. Select “New Channel.” There have been several contributions to the group with members posting voice notes of screaming, yelling, groaning, and wailing in different rhythms and pitches. Calling out the “degenerate” community or the crypto obsessives that engage in high-risk trading, Co-founder of NFT renting protocol Rentable World emiliano.eth shared this group on his Twitter. He wrote: “hey degen, are you stressed? Just let it out all out. Voice only tg channel for screaming”. Those being doxxed include outgoing Chief Executive Carrie Lam Cheng Yuet-ngor, Chung and police assistant commissioner Joe Chan Tung, who heads police's cyber security and technology crime bureau. Add the logo from your device. Adjust the visible area of your image. Congratulations! Now your Telegram channel has a face Click “Save”.!
from us


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