From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/api/window/innerwidth/index.html | 78 +++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 files/ko/web/api/window/innerwidth/index.html (limited to 'files/ko/web/api/window/innerwidth') diff --git a/files/ko/web/api/window/innerwidth/index.html b/files/ko/web/api/window/innerwidth/index.html new file mode 100644 index 0000000000..129b4a9347 --- /dev/null +++ b/files/ko/web/api/window/innerwidth/index.html @@ -0,0 +1,78 @@ +--- +title: Window.innerWidth +slug: Web/API/Window/innerWidth +tags: + - API + - Property + - Reference +translation_of: Web/API/Window/innerWidth +--- +

{{APIRef}}
+ 브라우저 윈도우의 뷰포트 너비로, 수직 스크롤바가 존재한다면 포함합니다.

+ +

구문

+ +

 

+ +
var intViewportWidth = window.innerWidth;
+ +

Value

+ +

intViewportWidth stores the window.innerWidth property value.

+ +

The window.innerWidth property is read only; it has no default value.

+ +

참고

+ +

innerWidth 값은 window, frame, frameset이나 다른 윈도우들처럼 모든 window 형식의 객체에서 사용할 수 있습니다.

+ +

There is an algorithm to obtain the width of the viewport excluding, if rendered, the vertical scrollbar.

+ +

예제

+ +
// 다음과 같이 뷰포트의 폭을 받아올 수 있습니다.
+var intFrameWidth = window.innerWidth;
+
+// 다음과 같이 frameset 안의 어떤 frame의 뷰포트 폭을 받아올 수 있습니다.
+var intFrameWidth = self.innerWidth;
+
+// 다음과 같이 가장 가까운 frameset의 뷰포트 폭을 받아올 수 있습니다.
+var intFramesetWidth = parent.innerWidth;
+
+// 다음과 같이 가장 바깥쪽 프레임셋의 뷰포트 폭을 받아올 수 있습니다.
+var intOuterFramesetWidth = top.innerWidth;
+ +

윈도우의 사이즈를 변경하려면, {{domxref("window.resizeBy")}} 또는 {{domxref("window.resizeTo")}}를 참조하세요.

+ +

명세

+ +

 

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSSOM View', '#dom-window-innerwidth', 'window.innerWidth')}}{{Spec2('CSSOM View')}}Initial definition
+ +

브라우저 호환성

+ +

{{Compat("api.Window.innerWidth")}}

+ +

참고 자료

+ + -- cgit v1.2.3-54-g00ecf