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/css/@media/device-width/index.html | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 files/ja/web/css/@media/device-width/index.html (limited to 'files/ja/web/css/@media/device-width') diff --git a/files/ja/web/css/@media/device-width/index.html b/files/ja/web/css/@media/device-width/index.html new file mode 100644 index 0000000000..5b43b18229 --- /dev/null +++ b/files/ja/web/css/@media/device-width/index.html @@ -0,0 +1,55 @@ +--- +title: device-width +slug: Web/CSS/@media/device-width +tags: + - '@media' + - CSS + - メディアクエリ + - メディア特性 + - リファレンス + - 非推奨 +translation_of: Web/CSS/@media/device-width +--- +
{{cssref}} {{deprecated_header}}
+ +

CSSdevice-width メディア特性は、出力機器の描画面の幅を調べるために使用することができます。

+ +

構文

+ +

device-width 特性は、 {{cssxref("<length>")}} 値として指定します。これは範囲の特性であり、つまり接頭辞の付いた min-device-width 及び max-device-width の変化形を使用して、それぞれ最小値と最大値をクエリすることができます。

+ +

+ +

この HTML は、800ピクセルより狭い機器に特別のスタイルシートを適用します。

+ +
<link rel="stylesheet" media="screen and (max-device-width: 799px)" href="http://foo.bar.com/narrow-styles.css" />
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS4 Media Queries', '#device-width', 'device-width')}}{{Spec2('CSS4 Media Queries')}}メディアクエリレベル4で非推奨になりました。
{{SpecName('CSS3 Media Queries', '#device-width', 'device-width')}}{{Spec2('CSS3 Media Queries')}}初回定義。
+ +

ブラウザーの対応

+ + + +

{{Compat("css.at-rules.media.device-width")}}

-- cgit v1.2.3-54-g00ecf