How does the CSS z-index property work?

  • Determines the stacking order of positioned elements. Elements with a higher z-index value are stacked on top of elements with lower values.
  • Defines the width and height of an element. Elements with a higher z-index value have a larger width and height.
  • Specifies the position of an element in the layout. Elements with a higher z-index value are positioned lower in the layout.
  • Sets the transparency level of an element. Elements with a higher z-index value are more transparent.
The correct option explains that the z-index property in CSS determines the stacking order of positioned elements, with higher values stacking on top.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *