请看看这个小提琴 - >http://jsfiddle.net/LwL9Ls4o/1/延迟的jQuery开始动画
JS:
$(".frontpage").bind('mousewheel', function (e) {
if (e.originalEvent.wheelDelta/120 < 0) {
$(".frontpage").stop().animate({
top: "-100%"
}, 700);
}
});
$(".container").bind('mousewheel', function (e) {
if (e.originalEvent.wheelDelta/120 > 0 && $(".container").scrollTop() < 10) {
$(".frontpage").stop().animate({
top: "0"
}, 700);
}
});
基本上它移动了FrontPage淡出人们的视线对下滚,并把它背在scrollup。它一直在正常工作,除了在动画开始的时候奇怪地慢。有什么建议么?谢谢!
非常感谢!我也应该试试这个插件:D – esln
回到你的问题。特殊的放松方式也非常简洁,您可以使用底部链接中的所有效果,而不是仅使用两种基本效果。我最喜欢的两个插件。 https://plugins.jquery.com/jquery.easing/ – Shikkediel