How to set element Layer (z-index) in CSS?

z-index property is used to set the layer of elements. We can set this property to auto (default) and number. It works only with position property value: fixed, relative, absolute.

The element which has a higher number appears at the top.

Ex: –

img {
position: fixed;
z-index: 565;
}

What is Z-Index and How Does It Work? - SpyreStudios
Tagged : / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x