0

In this 404 page, I can see the stars particle is moving as the mouse moving in different locations in the browser. I have no idea how to call this effect.

Can anyone provide a hint of the name of the effect and what is the right tool and how to achieve this? Thanks!

4

1 回答 1

1

该示例上的星星和每一层都不是粒子。它们是使用视差效果的固定图像,您可以在组成页面的元素上看到div#container_layer.

这种效果可以通过多种方式实现。最常见、响应迅速且优化最佳的解决方案使用 JQuery,例如这个:http ://wagerfield.github.io/parallax/

基本上它的工作方式是使用多个层并根据鼠标的坐标增加或减少它们的absolute或位置。relative

于 2013-10-27T01:32:56.950 回答