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/screen/width/index.html | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 files/ja/web/api/screen/width/index.html (limited to 'files/ja/web/api/screen/width') diff --git a/files/ja/web/api/screen/width/index.html b/files/ja/web/api/screen/width/index.html new file mode 100644 index 0000000000..9225969cba --- /dev/null +++ b/files/ja/web/api/screen/width/index.html @@ -0,0 +1,57 @@ +--- +title: Screen.width +slug: Web/API/Screen/width +tags: + - API + - CSSOM View + - Property + - Reference +translation_of: Web/API/Screen/width +--- +

{{APIRef("CSSOM")}}

+ +

画面の幅を返します。

+ +

構文

+ +
lWidth = window.screen.width
+
+ +

+ +
// Crude way to check that the screen is at least 1024x768
+if (window.screen.width >= 1024 && window.screen.height >= 768) {
+  // Resolution is 1024x768 or above
+}
+
+ +

+ +

このプロパティによって与えられた幅のすべてがウィンドウ自体に利用できるとは限らないことに注意してください。他のウィジェットが window オブジェクトで使用できない空間を占有している場合は、 window.screen.widthwindow.screen.availWidth に違いがあります。 {{DOMxRef("screen.height")}} も参照してください。

+ +

Internet Explorer は、画面の幅を報告する際に拡大率の設定を考慮します。拡大率が 100% に設定されている場合のみ、実際の画面の幅を返します。

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSSOM View', '#dom-screen-height', 'Screen.height')}}{{Spec2('CSSOM View')}}
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.Screen.height")}}

-- cgit v1.2.3-54-g00ecf