【发布时间】:2017-08-01 15:15:34
【问题描述】:
我在github插件中添加了平滑滚动效果。
github.com/simov/simplr-smoothscroll
我在标注中添加了效果:
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"></script>
<script src="http://simov.github.io/simplr-smoothscroll/lib/jquery.simplr.smoothscroll.js"></script>
然后我为效果添加了这段代码:
$(function () { $.srSmoothscroll() });
完成此操作后,我的页面不再向下滚动。它只会向上滚动。为什么这不能正常工作?
我添加这个的网站是该网站的这个页面:
http://realtorcatch.com/test_index
我希望它模仿:
http://www.templatemonster.com/demo/51054.html
在 githubs 网站上,它说用法是这样的:
$(function () {
$.srSmoothscroll({
// defaults
step: 55,
speed: 400,
ease: 'swing',
target: $('body'),
container: $(window)
})
})
但这对我的情况没有帮助。
有没有人知道为什么这不向下滚动?
【问题讨论】:
-
仍在寻找解决方案...
标签: javascript jquery html css scroll