[英]Fade images in and out based on scroll position
I'm trying to recreate the same effect used here: http://www.chylak.com/en/bags where the images will fade in/out based on scroll position. 我正在尝试重新创建此处使用的相同效果: http : //www.chylak.com/en/bags ,其中图像将根据滚动位置淡入/淡出。
I've had a look at the source and can see that "data-centre-centre" and "data-top-bottom" both have opacity values so it looks like a CSS transition? 我查看了源代码,可以看到“ data-centre-centre”和“ data-top-bottom”都具有不透明度值,因此看起来像CSS过渡吗?
Thanks for the help anyway :) 仍然感谢您的帮助:)
这是这个fiddle
中的一个小例子
For anyone interested, I ended up using skrollr.js https://github.com/Prinzhorn/skrollr 对于感兴趣的人,我最终使用了skrollr.js https://github.com/Prinzhorn/skrollr
Super easy to use and works great if you're trying to achieve a similar effect to the one referenced in my original question. 如果您想达到与我原始问题中提到的效果相似的效果,则超级好用且效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.