What this page does:

Included in this page is a simple JavaScript, that fills this page with senseless text so that we can actually scroll down to see if our layer keeps its position.

The red square is a layer which has a z-index of 1 and is thus placed on top of the layer the text is in (the background has a z-index of 0 by default).