0
0
Tailwindmarkup~5 mins

Z-index stacking control in Tailwind - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the CSS property z-index control?
The z-index property controls the vertical stacking order of elements that overlap. Higher values appear on top of lower values.
Click to reveal answer
beginner
How do you apply a z-index value of 10 using Tailwind CSS?
Use the class z-10 to set z-index: 10; in Tailwind CSS.
Click to reveal answer
intermediate
What must be true about an element for z-index to work?
The element must have a position other than static (like relative, absolute, fixed, or sticky) for z-index to take effect.
Click to reveal answer
beginner
What Tailwind class sets an element's position to <code>relative</code>?
The class relative sets position: relative; in Tailwind CSS.
Click to reveal answer
intermediate
If two elements have the same z-index, which one appears on top?
The element that appears later in the HTML code (lower in the source order) will appear on top if z-index values are equal.
Click to reveal answer
Which Tailwind class sets z-index: 20;?
Az-30
Bz-10
Cz-20
Dz-5
What is required for z-index to work on an element?
AElement must have a position other than static
BElement must have a background color
CElement must be a block element
DElement must have a width set
If two elements overlap and both have z-index: 10;, which one is on top?
AThe one with position absolute
BThe one that appears later in the HTML
CThe one with a bigger width
DThe one with a background color
Which Tailwind class sets position: relative;?
Arelative
Bpos-rel
Crel
Dposition-relative
What does a higher z-index value mean?
AElement has bigger size
BElement appears behind others
CElement is more transparent
DElement appears on top of others
Explain how z-index controls stacking order and what conditions must be met for it to work.
Think about how layers stack in real life, like papers on a desk.
You got /3 concepts.
    Describe how to use Tailwind CSS classes to control stacking order and positioning of elements.
    Remember Tailwind uses short class names for common CSS properties.
    You got /3 concepts.