This layer can be dragged

Z=1

This layer can be dragged

Z=2

This layer can be dragged

Z=3

This layer can be dragged

Z=4

The Z-index

Try dragging the layers and note the overlap and Z index relationship