Skip to content

z-index #63

Answered by Bunny77K9
DuajDiaz asked this question in Q&A
Discussion options

You must be logged in to vote

Z-index is a property in CSS that is used to define the order of elements on a web page. It works on the basis of order indices, where a higher-order element will appear before a lower-order element.

It only applies to elements that are positioned, i.e., those elements having the position attribute compulsorily.

Consider the following example:

div {
position: fixed;
left: 15px;
top: 20px;
z-index: -1;
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DuajDiaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants