This is a sample page, go back to the main article.
This fourth example shows shadows and elements scrolling in front of the text.
This example 4 is implemented using the computers 3D graphic hardware. It defines the background image to be a 3D object located 5000 pixels behind the text. Also the virtual users eye position moves down while scrolling down. This automatically leads to the desired parallax scrolling effect.
Note that in this simple example the background is just an image. See our homepage for a full 3D background.
Have a special look at the shadows that are created without much programming by the 3D engine. The position of the virtual light source moves down while scrolling. It travels a bit faster than the eye point and so the shadows move while scrolling.
Next example: Example 5