简体   繁体   English

使用JavaScript滚动时响应动画页面元素[EDIT:Parallax Scrolling]

[英]Responsively animate page elements while scrolling using JavaScript [EDIT: Parallax Scrolling]

I'm certain this has been brought up in the past; 我确信这是在过去提出来的; however I'm at a loss for a term. 但是我不知所措。

On this web page for square, the user scrolls through the section titled "At Square, different disciplines collaborate to design beautifully simple solutions."and the animation is activated to the right at that specific point on the page. 在这个方形网页上 ,用户滚动标题为“At Square,不同学科协作设计精美简单的解决方案”的部分,并在页面上的特定点激活动画。 As the user scrolls back the image reverts and so on. 当用户向后滚动时,图像会恢复,依此类推。 How are they achieving this? 他们如何实现这一目标?

AUG 2013: So it's been nine months since I've asked this question and parallax scrolling has just about run it's course. 2013年8月:自从我提出这个问题以来已经有九个月了,视差滚动刚刚开始运行。 I'm attaching several links for further reading on this subject ranging from how to achieve it to why to avoid it. 我正在附上几个链接,以便进一步阅读这个主题,从如何实现它到为什么要避免它。

Examples of parallax scrolling: 视差滚动的示例:


Tutorials: 教程:


Thoughts: 思考:


It is called parallax scrolling . 它被称为视差滚动

They just detect the window position and then apply a jquery animation when the window is scrolled to whatever points they set. 它们只检测窗口位置,然后在窗口滚动到它们设置的任何点时应用jquery动画。

See an in-depth explination and tutorial here: http://coding.smashingmagazine.com/2011/07/12/behind-the-scenes-of-nike-better-world/ 请参阅此处的深入探索和教程: http//coding.smashingmagazine.com/2011/07/12/behind-the-scenes-of-nike-better-world/

There is an example and opensource GitHub project here: http://prinzhorn.github.com/skrollr/ 这里有一个示例和开源GitHub项目: http//prinzhorn.github.com/skrollr/

In my opinion it is normally bad design. 在我看来,这通常是糟糕的设计。 I suppose it can be subtle and done well but it often is distracting for no real purpose. 我认为它可以是微妙的并且做得很好,但它往往会分散注意力,没有真正的目的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM