如何移动图像在固定路径上的用户滚动
How to move image on fixed path on user scroll
我做了这个管道演示作为我要做的一个例子。管道和背景颜色跨越3div,并且我有一个小发光球,我想在用户向下滚动页面时沿着管道移动。在管道的水平部分,我想创建一个扩展的div,但首先,下面是代码:
<!DOCTYPE html>
<html>
<head>
<style>
.canvas {
background-image: url(/images/piping_demonstration2.png);
}
#glow {
background-image: url(/images/glow.png);
background-attachment: fixed;
}
.dadiv {
height: 500px;
}
</style>
</head>
<body>
<section class="canvas">
<div id="glow">
<div id="first" class="dadiv" height="500px"></div>
<div id="second"class="dadiv" height="500px"></div>
<div id="third" class="dadiv" height="500px"></div>
</div>
</section>
</body>
</html>
我明白我将不得不使用JavaScript,但我还没有能够找到一个好的源代码开始。
查看jQuery插件Scrollpath: http://joelb.me/scrollpath/。
不再维护,但源代码(https://github.com/JoelBesada/scrollpath)应该是一个很好的起点。
相关文章:
- 幻灯片滚动javascript不起作用
- 将视口底部滚动到元素底部
- jQuery Lazy加载动画滚动
- 设置滑块分区上的滚动
- 结合jQuery和jetpack无限滚动
- 滚动页面时的弯曲图像路径
- 沿着路径Paper.js滚动
- 迪吉特.树设置路径并滚动到所选节点
- 路径点,animate.css和滚动的不透明度问题
- 如何触发事件,当用户滚动到页面顶部使用Jquery和路径点
- 通过svg路径滚动移动图像
- 如何一次一个滚动绘制每个SVG路径(按时间顺序)
- Jquery路径点与平滑滚动
- 使用javascript、HTML5和CSS3在设置的路径上滚动图像
- jQuery路径点粘性导航,当通过点击向上滚动是1px off
- 如何移动图像在固定路径上的用户滚动
- 在用户滚动时沿弯曲路径移动元素
- 沿着路径、曲线和线条滚动
- jQuery路径点在初始滚动时不起作用
- Greensock GSAP + SVG路径动画+滚动