blockly > utils > style > getPageOffset
utils.style.getPageOffset() 函数
返回相对于 HTML 文档左上角的坐标对象。类似于 Closure 的 goog.style.getPageOffset
Signature:
export declare function getPageOffset(el: Element): Coordinate;
参数
参数 | 类型 | 说明 |
---|---|---|
el | 元素 | 要为其获取页面偏移量的元素。 |
返回:
页面偏移量。