html5 - 网页滚动图片变化的原理
PHP中文网
PHP中文网 2017-04-17 11:04:19
0
2
609

麦当劳Dollar Menu的广告 http://www.mcdonalds.com/us/en/promotions/value.html

网页上的图片随着页面的上下滚动会产生相应的变化,这个是如何制作的?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
Ty80

Parallax scrolling.

Listen to the scroll event and set a scroll rate v=f(y) and the scroll limits Ymin and Ymax that appear on the screen for each layer/p.

Please google for implementation details.

——

https://github.com/stephband/jparallax

http://markdalgleish.com/projects/stellar.js

洪涛

Hi, @Humphry’s answer is already very good. This effect of monitoring scroll events was created by Nike’s new product promotion in 2011, and was later popularized. There are many examples online. The most amazing Youth Pi official website is a bit slow to load but the effect is amazing. (Sorry, it was later confirmed that the effect has been changed. The original visually impaired website was very amazing.)

There is an article recommended for you to help you better understand the "scenes" in animation http://blog.teamtreehouse.com/multiplane-design-with-svgs-and-css-3d-transforms

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template