Function: scrollToTop

scrollToTop(): void

滚动到顶部 使用document.documentElement.scrollTop或document.body.scrollTop获取到顶部的距离。从顶部滚动一小部分距离。 使用window.requestAnimationFrame()来滚动。

Returns

void

Since

1.2.1

Example

scrollToTop();
ON THIS PAGE