getScrollTop
Start from API_LEVEL
2.0
. Please refer to API_LEVEL.
Get the vertical coordinate of the current scroll position of the page.
Type
function getScrollTop(): Result
Parameters
Result
Type | Description |
---|---|
number | The vertical coordinate of the current scroll position of the page |
Example
import { getScrollTop } from '@zos/page'
const top = getScrollTop()
console.log(top)