Z-index
Encyclopedia
z-index
is a CSSCSS
-Computing:*Cascading Style Sheets, a language used to describe the style of document presentations in web development*Central Structure Store in the PHIGS 3D API*Closed source software, software that is not distributed with source code...
property that sets the stack order of specific elements. An element with greater stack order is always in front of another element with lower stack order.
Negative stack orders can also be used in the same manner. A negative value will appear behind a more positive one.
z-index
only works on elements that have a position value (i.e. position: relative;
). Like all other CSS properties, it can be set with JavaScriptJavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....
as well with the following syntax: