diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/cssstyledeclaration/getpropertycssvalue | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/ja/web/api/cssstyledeclaration/getpropertycssvalue')
-rw-r--r-- | files/ja/web/api/cssstyledeclaration/getpropertycssvalue/index.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/files/ja/web/api/cssstyledeclaration/getpropertycssvalue/index.html b/files/ja/web/api/cssstyledeclaration/getpropertycssvalue/index.html new file mode 100644 index 0000000000..f3ce66652d --- /dev/null +++ b/files/ja/web/api/cssstyledeclaration/getpropertycssvalue/index.html @@ -0,0 +1,65 @@ +--- +title: CSSStyleDeclaration.getPropertyCSSValue() +slug: Web/API/CSSStyleDeclaration/getPropertyCSSValue +tags: + - API + - CSSOM + - Method + - Obsolete + - Reference +translation_of: Web/API/CSSStyleDeclaration/getPropertyCSSValue +--- +<p>{{ APIRef("CSSOM") }} {{Obsolete_header}}</p> + +<p><span class="seoSummary"><strong>CSSStyleDeclaration.getPropertyCSSValue()</strong> メソッドインターフェイスは、プロパティの CSS 値を含む {{domxref('CSSValue')}} を返します。</span> プロパティ名が省略プロパティの場合は <code>null</code> を返すことに注意して下さい。</p> + +<p>代わりに {{domxref("CSSStyleDeclaration.getPropertyValue()")}} を使用する必要があります。</p> + +<h2 id="構文">構文</h2> + +<pre class="syntaxbox notranslate">var <em>value</em> = <em>style</em>.getPropertyCSSValue(<em>property</em>);</pre> + +<h3 id="パラメータ">パラメータ</h3> + +<ul> + <li><em><code>property</code></em> は、取得するプロパティ名を表す {{domxref('DOMString')}} です。</li> +</ul> + +<h3 id="返り値">返り値</h3> + +<ul> + <li><code><em>value</em></code> は、プロパティの CSS 値を含む {{domxref('CSSValue')}} です。存在しない場合は <code>null</code> を返します。</li> +</ul> + +<h2 id="例">例</h2> + +<p>次の JavaScript コードは、 <code>color</code> CSS プロパティの計算された RGB 値を含むオブジェクトを取得します:</p> + +<pre class="brush: js notranslate">var style = window.getComputedStyle(elem, null); +var rgbObj = style.getPropertyCSSValue('color').getRGBColorValue(); +</pre> + +<h2 id="仕様">仕様</h2> + +<table> + <thead> + <tr> + <th scope="col">仕様</th> + <th scope="col">ステータス</th> + <th scope="col">備考</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('DOM2 Style', 'css.html#CSS-CSSStyleDeclaration', 'CSSStyleDeclaration')}}</td> + <td>{{Spec2('DOM2 Style')}}</td> + <td><a href="https://lists.w3.org/Archives/Public/www-style/2003Oct/0347.html">2003年7月</a>に廃止と宣言</td> + </tr> + </tbody> +</table> + +<h2 id="ブラウザー実装状況">ブラウザー実装状況</h2> + + + +<p>{{Compat("api.CSSStyleDeclaration.getPropertyCSSValue")}}</p> |