blockly >实用程序 >样式 >getSize

utils.style.getSize() 函数

获取元素的高度和宽度。类似于 Closure 的 goog.style.getSize

Signature:

export declare function getSize(element: Element): Size;

参数

参数 类型 说明
元素 元素 要获取大小的元素。

返回

尺寸

具有宽度/高度属性的对象。