From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../getpropertyvalue/index.html | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 files/ja/web/api/cssstyledeclaration/getpropertyvalue/index.html (limited to 'files/ja/web/api/cssstyledeclaration/getpropertyvalue') diff --git a/files/ja/web/api/cssstyledeclaration/getpropertyvalue/index.html b/files/ja/web/api/cssstyledeclaration/getpropertyvalue/index.html new file mode 100644 index 0000000000..feb4705491 --- /dev/null +++ b/files/ja/web/api/cssstyledeclaration/getpropertyvalue/index.html @@ -0,0 +1,67 @@ +--- +title: CSSStyleDeclaration.getPropertyValue() +slug: Web/API/CSSStyleDeclaration/getPropertyValue +tags: + - API + - CSSOM + - Method + - Reference +translation_of: Web/API/CSSStyleDeclaration/getPropertyValue +--- +

{{ APIRef("CSSOM") }}

+ +

CSSStyleDeclaration.getPropertyValue() メソッドインターフェイスは、指定された CSS プロパティの値を含む {{domxref('DOMString')}} を返します。

+ +

構文

+ +
var value = style.getPropertyValue(property);
+ +

パラメータ

+ + + +

返り値

+ + + +

+ +

次の JavaScript コードは CSS セレクタールールの margin プロパティの値をクエリします:

+ +
var declaration = document.styleSheets[0].cssRules[0].style;
+var value = declaration.getPropertyValue('margin'); // "1px 2px"
+
+ +

仕様

+ + + + + + + + + + + + + + + + + + + + + +
仕様ステータス備考
{{SpecName('CSSOM', '#dom-cssstyledeclaration-getpropertyvalue', 'CSSStyleDeclaration.getPropertyValue()')}}{{Spec2('CSSOM')}}
{{SpecName('DOM2 Style', 'css.html#CSS-CSSStyleDeclaration', 'CSSStyleDeclaration')}}{{Spec2('DOM2 Style')}}
+ +

ブラウザー実装状況

+ + + +

{{Compat("api.CSSStyleDeclaration.getPropertyValue")}}

-- cgit v1.2.3-54-g00ecf