ブロックする >utils >スタイル >getComputedStyle

utils.style.getComputedStyle() 関数

ノードの計算済みのスタイル値を取得します。リクエストされたプロパティが SVG であり、明示的に設定されていない場合(firefox と webkit)、空の文字列を返します。

Closure の goog.style.getComputedStyle からコピー

署名:

export declare function getComputedStyle(element: Element, property: string): string;

パラメータ

パラメータ 説明
要素 要素 スタイルを取得する要素です。
プロパティ 文字列 取得するプロパティ(キャメルケース)。

戻り値:

文字列

スタイルの値。