【发布时间】:2020-09-16 16:31:17
【问题描述】:
我得到了这个脚本
$("body, html").animate({scrollTop: $(document).height()}, 1000)
如上所示,它将使页面向下滚动到文档高度:也就是底部。
但是在我的情况下它太低了,我想向下滚动到bottom:100px; 或bottom:10%;
这可能吗?我找到了examples,但they 对我不起作用。
我缺少什么让它工作?:)
【问题讨论】:
-
嗨,杰克。所以如果你尝试
scrollTop: $(document).height() - 100它不起作用?
标签: javascript jquery