From 52c12c1c3a8a92091f5caadf2cd1cc632b345d39 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 18 Jul 2021 23:58:20 +0900 Subject: Web/API/CSSStyleDeclaration 以下を更新 (#1482) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Web/API/CSSStyleDeclaration/cssText を新規翻訳 2021/06/13 時点の英語版に基づき新規翻訳 * Web/API/CSSStyleDeclaration 以下を整備 Web/API/CSSStyleDeclaration 以下について、2021/07/10時点の内容に同期。未翻訳の記事については新規翻訳 --- .../getpropertycssvalue/index.html | 66 ++++++++++------------ 1 file changed, 30 insertions(+), 36 deletions(-) (limited to 'files/ja/web/api/cssstyledeclaration/getpropertycssvalue') diff --git a/files/ja/web/api/cssstyledeclaration/getpropertycssvalue/index.html b/files/ja/web/api/cssstyledeclaration/getpropertycssvalue/index.html index f3ce66652d..4889ed135a 100644 --- a/files/ja/web/api/cssstyledeclaration/getpropertycssvalue/index.html +++ b/files/ja/web/api/cssstyledeclaration/getpropertycssvalue/index.html @@ -2,64 +2,58 @@ title: CSSStyleDeclaration.getPropertyCSSValue() slug: Web/API/CSSStyleDeclaration/getPropertyCSSValue tags: - - API - - CSSOM - - Method - - Obsolete - - Reference +- API +- CSSOM +- Method +- Deprecated +- Reference +browser-compat: api.CSSStyleDeclaration.getPropertyCSSValue translation_of: Web/API/CSSStyleDeclaration/getPropertyCSSValue --- -

{{ APIRef("CSSOM") }} {{Obsolete_header}}

+

{{ APIRef("CSSOM") }} {{deprecated_header}}

-

CSSStyleDeclaration.getPropertyCSSValue() メソッドインターフェイスは、プロパティの CSS 値を含む {{domxref('CSSValue')}} を返します。 プロパティ名が省略プロパティの場合は null を返すことに注意して下さい。

+

CSSStyleDeclaration.getPropertyCSSValue() メソッドインターフェイスは、プロパティの CSS 値を含む {{domxref('CSSValue')}} を返します。プロパティ名が一括指定プロパティの場合は null を返すことに注意して下さい。

-

代わりに {{domxref("CSSStyleDeclaration.getPropertyValue()")}} を使用する必要があります。

+
+

注: このインターフェースは、型付けされた CSS オブジェクトモデルを作成する試みの一部でした。この試みは放棄されており、ほとんどのブラウザーは実装していません。

+

この目的を達成するには、以下のものを使用することができます。

+ +
-

構文

+

構文

-
var value = style.getPropertyCSSValue(property);
+
var value = style.getPropertyCSSValue(property);
-

パラメータ

+

引数

-

返り値

+

返値

-

+

-

次の JavaScript コードは、 color CSS プロパティの計算された RGB 値を含むオブジェクトを取得します:

+

次の JavaScript コードは、 CSS の color プロパティの計算済みの RGB 値を含むオブジェクトを取得します。

-
var style = window.getComputedStyle(elem, null);
+
var style = window.getComputedStyle(elem, null);
 var rgbObj = style.getPropertyCSSValue('color').getRGBColorValue();
 
-

仕様

+

仕様書

- - - - - - - - - - - - - - - -
仕様ステータス備考
{{SpecName('DOM2 Style', 'css.html#CSS-CSSStyleDeclaration', 'CSSStyleDeclaration')}}{{Spec2('DOM2 Style')}}2003年7月に廃止と宣言
+

この機能はもともと、 DOM Style Level 2 仕様書で定義されていましたが、それ以降の標準化の取り組みからは外れています。

-

ブラウザー実装状況

+

この機能は、最新の、しかし互換性のない、 CSS Typed Object Model API に取って代わられ、現在は標準化されています。

+

ブラウザーの互換性

- -

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

+

{{Compat}}

-- cgit v1.2.3-54-g00ecf