[英]jquery scrolling vertical/horizontal
I'm trying to make an entire website with all events triggered by scrolling. 我正在尝试制作一个包含滚动触发的所有事件的整个网站。 I just need help to achieve this effect :
我只需要帮助即可达到此效果:
<body>
<header> </header>
<div class="scroll-vertical" id="tile1"></div>
<div class="scroll-vertical" id="tile2"></div>
<div class="scroll-vertical" id="tile3"></div>
<div class="scroll-horizontal" id="tile4">
<div class="horizontal" id="tile5"></div>
<div class="horizontal" id="tile5-a"></div>
<div class="horizontal" id="tile5-b"></div>
<div class="horizontal" id="tile5-c"></div>
</div>
<div class="scroll-vertical" id="tile6"></div>
<div class="scroll-vertical" id="tile7"></div>
<footer> </footer>
I know there is a jquery plugin named fullpage.js which does that pretty well but as a student learning web development using plugins is not the best way to improve my skills. 我知道有一个名为fullpage.js的jquery插件可以很好地完成此工作,但是作为一个学生学习使用插件的Web开发并不是提高我的技能的最佳方法。
Thanks for your help! 谢谢你的帮助!
Cheers Simon 干杯西蒙
Why would you assume that ? 你为什么会假设呢? I doubt it can get much simpler than
我怀疑它会比简单得多
$(document).ready(function() {
$('#fullpage').fullpage();
});
The author of the plugin also most likely already encountered, considered and had to solve a number of details and issues, cross-browser and non, that you have not yet had a chance to think about. 该插件的作者很可能已经遇到,考虑并必须解决许多细节和问题,跨浏览器和非浏览器,您还没有机会考虑这些问题。
Edit :: animating divs: 编辑::动画div:
$( "#bigasshorizontaldiv" ).animate({
left: "-=thewidthofoneviewport",
}, 5000, function() {
// Animation complete.
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.