blockly > utils > style > getComputedStyle
utils.style.getComputedStyle() 函式
擷取節點的計算樣式值。如果要求的屬性為 SVG 且未明確設定 (Firefox 和 webkit),則會傳回空白字串。
從 Closure 的 goog.style.getComputedStyle 複製而來
Signature:
export declare function getComputedStyle(element: Element, property: string): string;
參數
參數 | 類型 | 說明 |
---|---|---|
元素 | 元素 | 要設定樣式的元素。 |
資源 | 字串 | 要去的物業 (駝峰式大小寫)。 |
傳回:
字串
樣式值。