z-index

The z-index CSS property specifies the stack level of the box in the current stacking context and whether the box establishes a local stacking context.

Syntax

CSS

z-index: value;

JS

object.style.zIndex = "value";

Values

<'z-index'> = auto | <integer> | inherit
auto

Automatically specified by the user agent.

<integer>

Specifies one or more decimal digits (0-9).

inherit

Specifies the same value as the parent.

Initial

auto

Examples

auto

integer

JS

World Wide Web Consortium (W3C)

Home Menu