- Ejecutores
-
Aprender
Aprender Python Ejemplos ejecutables, NumPy, pandas y más Aprender IA / Machine LearningRedes neuronales, ML y LLM desde cero Aprender C y C++ Punteros, memoria, STL y C++ moderno Aprender C#Fundamentos, POO, LINQ, async y ejercicios de .NET Aprender MatplotlibGráficos de líneas, barras, dispersión y sectores con visualizadores Aprender RustOwnership, traits, manejo de errores e hilos Aprender GoSlices, interfaces, goroutines y canales Algoritmos en Python Búsqueda, ordenación, recursión y visualizadores O(n) Algoritmos en C y C++ Compara implementaciones en C y C++ Programación para niños ¡Aprende a programar jugando!
- QuizzesNuevo
- RetosNuevo
- Para docentesNuevo
- Actualizaciones
- Invítame a un café
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.
Pregunta de ejemplo
Pregunta 1 de 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>
Ver la respuesta
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.
Qué cubre este quiz
- 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
Preguntas frecuentes
¿Necesito una cuenta?
No. Cualquiera puede jugar. Inicia sesión para guardar tu XP, racha, insignias e historial.
¿Puedo repetirlo?
Sí. Se guarda tu mejor puntuación, y las preguntas y respuestas se mezclan cada vez.