gpt4 book ai didi

javascript - 滚动一次动画

转载 作者:行者123 更新时间:2023-11-28 19:28:52 27 4
gpt4 key购买 nike

我正在使用fadethis我正在使用 Node.js 插件并尝试使滚动动画仅发生一次,不确定哪里出了问题

http://jsfiddle.net/robcleaton/pLdwdzpz/

JS

$(document).ready(function() {
$(window).fadeThis();
});

最佳答案

简单的一个:

$(window).fadeThis({
reverse:false
});

文档指定了这个来设置插件:

<script>
$(document).ready(function() {
$(window).fadeThis({
baseName: "slide-",
speed: 500, // <a href="http://www.jqueryscript.net/animation/">Animation</a> speed in milliseconds.
easing: "swing", // Animation easing.
offset: 0, // <a href="http://www.jqueryscript.net/tags.php?/Scroll/">Scroll</a> offset, allowing to fire fading a little after or before the element appear.
reverse: true, // Make element disappear again when scrolled out, and fade again when scrolled in.
distance: 50, // Element distance to its emplacement, before animation.
scrolledIn: null, // Function to call when the element come in viewport.
scrolledOut: null // Function to call when the element go out of the viewport.
});
});
</script>

关于javascript - 滚动一次动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27281544/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com