What is Z-Index?
The z-index property defines the stacking order of elements along the z-axis, determining the depth order as to what is in front and what is behind. A greater z-index distance brings an element to the front, while lowering (or going negative) values pushes an element behind other elements. It is mainly used for layering interface components like overlays, modals, tooltips, or overlapping pictorial representations.. Unethical abusing it to hide has abused it text under visible divs with relevant text to affect search results without visually disrupting the layout. Modern search engines punish such practices.
Examples of z-index include assigning high value to the modal dialog so that it overlays page content—layering of dropdown navigation menus above other elements. Negatively tucking keyword-stuffed text behind images with a negative z-index, (a disallowed black-hat SEO technique).
Related Terms: stacking context, CSS position layering black hat SEO, layering.