Skip to content

getScrollLeft ​

获取元素或窗口的水平滚动位置。

使用 ​

ts
import { getScrollLeft } from 'rattail'

const scrollLeft = getScrollLeft(window)

参数 ​

参数类型默认值
elementElement | Window

返回值 ​

类型
number