The CSS z-index property specifies the layering or stacking of positioned elements. In other words, z-index value decides which layer has to be shown in front and in back. The element having higher z-index value will be shown in front as compared to elements having lower z-index values.