blockly >实用程序 >样式 >getPageOffset

utils.style.getPageOffset() 函数

用于返回相对于 HTML 文档左上角的 Coordinate 对象。类似于 Closure 的 goog.style.getPageOffset

Signature:

export declare function getPageOffset(el: Element): Coordinate;

参数

参数 类型 说明
el 元素 要获取其页面偏移量的元素。

返回

坐标

页面偏移量。