From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/htmlstyleelement/index.html | 80 ++++++++++++++++++ files/ja/web/api/htmlstyleelement/media/index.html | 94 ++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 files/ja/web/api/htmlstyleelement/index.html create mode 100644 files/ja/web/api/htmlstyleelement/media/index.html (limited to 'files/ja/web/api/htmlstyleelement') diff --git a/files/ja/web/api/htmlstyleelement/index.html b/files/ja/web/api/htmlstyleelement/index.html new file mode 100644 index 0000000000..6667c876c0 --- /dev/null +++ b/files/ja/web/api/htmlstyleelement/index.html @@ -0,0 +1,80 @@ +--- +title: HTMLStyleElement +slug: Web/API/HTMLStyleElement +tags: + - DOM + - DOM Reference + - 要更新 +translation_of: Web/API/HTMLStyleElement +--- +
{{ApiRef}}
+ +

HTMLStyleElement インタフェースは {{HTMLElement("style")}} 要素を表すインタフェースです。{{domxref("HTMLElement")}} と {{domxref("LinkStyle")}} のプロパティとメソッドを継承しています。

+ +

This interface doesn't allow to manipulate the CSS it contains (in most case). To manipulate CSS, see Using dynamic styling information for an overview of the objects used to manipulate specified CSS properties using the DOM.

+ +

プロパティ

+ +

{{domxref("HTMLElement")}} および {{domxref("LinkStyle")}} から継承するプロパティの他に、以下の固有プロパティを持ちます。

+ +
+
{{domxref("HTMLStyleElement.media")}}
+
スタイル情報の適用先として意図するメディアを表す {{domxref("DOMString")}}
+
{{domxref("HTMLStyleElement.type")}}
+
この style 要素のスタイルの種類を表す {{domxref("DOMString")}}
+
{{domxref("HTMLStyleElement.disabled")}}
+
{{domxref("Boolean")}}。スタイルシート有効時には true 、無効時には false を返す。
+
{{domxref("HTMLStyleElement.scoped")}}
+
{{domxref("Boolean")}}。スタイルの適用対象が文書全体の場合は falsescoped 属性により適用範囲が制限されている場合は true を返す。
+
+ +

メソッド

+ +

固有のメソッドは持ちません。

+ +

仕様

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
仕様書策定状況コメント
{{SpecName('HTML WHATWG', "semantics.html#the-style-element", "HTMLStyleElement")}}{{Spec2('HTML WHATWG')}}{{SpecName("HTML5 W3C")}} より変更無し
{{SpecName('HTML5 W3C', "document-metadata.html#the-style-element", "HTMLStyleElement")}}{{Spec2('HTML5 W3C')}}scoped プロパティの追加
{{SpecName('DOM2 HTML', 'html.html#ID-16428977', 'HTMLStyleElement')}}{{Spec2('DOM2 HTML')}}{{domxref("LinkStyle")}} インタフェースからの継承の追加
{{SpecName('DOM1', 'level-one-html.html#ID-16428977', 'HTMLStyleElement')}}{{Spec2('DOM1')}}最初期の定義
+ +

ブラウザ実装状況

+ +
+ + +

{{Compat("api.HTMLStyleElement")}}

+
+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlstyleelement/media/index.html b/files/ja/web/api/htmlstyleelement/media/index.html new file mode 100644 index 0000000000..a3f074515d --- /dev/null +++ b/files/ja/web/api/htmlstyleelement/media/index.html @@ -0,0 +1,94 @@ +--- +title: HTMLStyleElement.media +slug: Web/API/HTMLStyleElement/media +tags: + - API + - HTML DOM + - HTMLStyleElement + - Media + - プロパティ + - リファレンス +translation_of: Web/API/HTMLStyleElement/media +--- +
{{APIRef("HTML DOM")}}
+ +

HTMLStyleElement.media プロパティは、スタイル情報の対象と想定するメディアを指定します。

+ +

構文

+ +
medium = style.media
+style.media = medium
+
+ +

引数

+ + + +

+ +
<!doctype html>
+<html>
+<head>
+
+<link id="LinkedStyle" rel="stylesheet" href="document.css" type="text/css" media="screen" />
+<style id="InlineStyle" rel="stylesheet" type="text/css" media="screen, print">
+p { color: blue; }
+</style>
+</head>
+<body>
+
+<script>
+alert('LinkedStyle: ' + document.getElementById('LinkedStyle').media); // 'screen'
+alert('InlineStyle: ' + document.getElementById('InlineStyle').media); // 'screen, print'
+</script>
+
+</body>
+</html>
+
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('HTML WHATWG', "semantics.html#attr-style-media", "HTMLStyleElement")}}{{Spec2('HTML WHATWG')}} 
{{SpecName('HTML5.1', "semantics.html#attr-style-media", "HTMLStyleElement")}}{{Spec2('HTML5.1')}} 
{{SpecName('HTML5 W3C', "semantics.html#attr-style-media", "HTMLStyleElement")}}{{Spec2('HTML5 W3C')}} 
{{SpecName('DOM2 HTML', 'html.html#ID-16428977', 'HTMLStyleElement')}}{{Spec2('DOM2 HTML')}} 
{{SpecName('DOM1', 'level-one-html.html#ID-16428977', 'HTMLStyleElement')}}{{Spec2('DOM1')}}初回定義
+ +

ブラウザーの対応

+ + + +

{{Compat("api.HTMLStyleElement.media")}}

-- cgit v1.2.3-54-g00ecf