封鎖 >utils >樣式 >getSize

utils.style.getSize() 函式

取得元素的高度和寬度。類似 Closure 的 goog.style.getSize

Signature:

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

參數

參數 類型 說明
元素 元素 要取得大小的元素。

傳回:

尺寸

具有寬度/高度屬性的物件。