If u work in z-index layer better to think as pages of book. Each page can be declared as z-index values, if you declare z-index as 2 it will be came before in z-index 1.
when u working in z-index values think each z-index value as pages of book.if you want to read the next page you have to travel or open the previous page same thing in z-index values.u can declare the z-index thrw the valid name for example
.firstpage{ z-index:1; } .secondpage{ z-index:2; }
you can see the below image for representing z-index values cdn.css-tricks.com/wp-content/uploads/2011/09/bas…