z-index
z-index
is a CSS 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.
p {
position: relative;
z-index: -1;
}
Negative stack orders can also be used in the same manner. A negative value will appear behind a positive one. z-index
only works on elements that have a position value (e.g. position: relative;
). Like all other CSS properties, it can be set with JavaScript as well with the following syntax:
object.style.zIndex="1"
See also
External links
This article is issued from Wikipedia - version of the Thursday, June 12, 2014. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.