A plain-language romp through the trials and tribulations of
z-indexby Isabel Brison. On the surface,
z-index seems simple. It's a number and it represents what is on top of what... assuming it is positioned... and assuming it is within the same stacking context as the other things.
… Read article
... that is the gist of it: stacking contexts are caused by a variety of properties and the main reasons for their existence are performance concerns and ease of implementation by browsers.