Skip to main content
Version: v3

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

TypeDescription
numberThe vertical coordinate of the current scroll position of the page

Example

import { getScrollTop } from '@zos/page'

const top = getScrollTop()
console.log(top)