- Компиляторы
-
Обучение
Изучить Python Запускаемые примеры, NumPy, pandas и другое Изучить ИИ / машинное обучениеНейросети, ML и LLM с нуля Изучить C и C++ Указатели, память, STL и современный C++ Изучить C#Основы C#, ООП, LINQ, async и упражнения .NET Изучить MatplotlibЛинейные, столбчатые, точечные и круговые диаграммы с визуализацией Изучение RustВладение, трейты, обработка ошибок и потоки Изучение GoСрезы, интерфейсы, горутины и каналы Алгоритмы на Python Поиск, сортировка, рекурсия и визуализация O(n) Алгоритмы на C и C++ Сравнение реализаций на C и C++ Программирование для детей Учись программировать, играя!
- КвизыНовое
- ЗадачиНовое
- УчителямНовое
- Обновления
- Угостить кофе
Tricky CSS Questions
This CSS quiz is for people who think they know CSS well. It covers the behaviors that surprise even experienced developers: stacking contexts, margin collapsing through parents, percentage padding, :is() specificity, sticky elements that will not stick and flex items that will not shrink.
Пример вопроса
Вопрос 1 из 10.child and .b overlap. Which one is drawn on top?
<style>
.a { position: relative; z-index: 1; }
.child { position: relative; z-index: 9999; }
.b { position: relative; z-index: 2; }
</style>
<div class="a"><div class="child">child</div></div>
<div class="b">b</div>
Показать ответ
D. .b, because .child is trapped inside .a's stacking context .a with position and z-index creates a stacking context, and .child's 9999 only counts inside it. At the outer level .a (1) is compared with .b (2), so .b and everything in it wins.
Что проверяет этот квиз
- Stacking contexts and why
z-index: 9999can lose - Margins that escape their parent and percentage padding
- Specificity of
:is()and exact attribute selectors position: stickyandposition: fixedsurprises- Inline-block whitespace,
100vhon mobile and flexmin-width
Частые вопросы
Нужен ли аккаунт?
Нет. Играть может любой. Войдите, чтобы сохранять XP, серию, значки и историю.
Можно пройти ещё раз?
Да. Лучший результат сохраняется, а вопросы и ответы каждый раз перемешиваются.