Optical illusions can be exciting. In particular, when still move to the subject area of web design. There are rather few solutions, and so two different samples appear to be particularly beautiful.
The effect, which you use here is called parallax. Both demos come with detailed explanation and, therefore, so everyone can develop the background and implementation.
You can Get full demo or tutorial of 3D background css effects on below link
- A parallax illusion with CSS: The Horse in Motion
- Starry Night: Incredible 3D Background Effect with Parallax