Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个要求,当我按下按钮时,我想进入滚动面板的中间区域或底部区域,而不是从滚动中。有可能吗?..如果是这样,我怎样才能达到我的目标。
提前致谢
使用setVerticalScrollPosition()withgetMaximumVerticalScrollPosition()到最后。对于中间部分,您必须通过自己的获取clientHeight和计算来scrollHeight计算getScrollableElement()。
setVerticalScrollPosition()
getMaximumVerticalScrollPosition()
clientHeight
scrollHeight
getScrollableElement()