Skip to content

Function: scrollToTop() ​

ts
function scrollToTop(scroll: HTMLElement): void

将可滚动元素滚动到顶部

Example ​

ts
scrollToTop(dom: HTMLElement);

Parameters ​

ParameterTypeDescription

scroll

HTMLElement

要滚动的元素

Returns ​

void