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/screen/orientation/index.html | 120 +++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 files/ko/web/api/screen/orientation/index.html (limited to 'files/ko/web/api/screen/orientation') diff --git a/files/ko/web/api/screen/orientation/index.html b/files/ko/web/api/screen/orientation/index.html new file mode 100644 index 0000000000..d77c14e6cb --- /dev/null +++ b/files/ko/web/api/screen/orientation/index.html @@ -0,0 +1,120 @@ +--- +title: Screen.orientation +slug: Web/API/Screen/orientation +translation_of: Web/API/Screen/orientation +--- +

{{APIRef("CSSOM View")}} {{SeeCompatTable}}

+ +

Summary

+ +

orientation 속성은 화면의 현재 방향을 알려 준다.

+ +
+

Note: 이 함수는 설치된 웹앱 또는 full-screen mode 의 웹페이지에서 동작한다.

+
+ +

Syntax

+ +
var orientation = window.screen.orientation;
+
+ +

Return value

+ +

리턴값은 화면의 방향을 표현하는 문자열이다. portrait-primary, portrait-secondary, landscape-primary, landscape-secondary 가 될 수 있다. (각 값들에 대해 좀 더 많은 정보를 구하려면 {{domxref("window.screen.lockOrientation","lockOrientation")}} 를 보라.).

+ +

Example

+ +
var orientation = screen.mozOrientation;
+
+if (orientation === "landscape-primary") {
+  console.log("That looks good.");
+} else if (orientation === "landscape-secondary") {
+  console.log("Mmmh... the screen is upside down!");
+} else if (orientation === "portrait-secondary" || orientation === "portrait-secondary") {
+  console.log("Mmmh... you should rotate your device");
+}
+
+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('Screen Orientation', '', 'Screen Orientation') }}{{ Spec2('Screen Orientation') }}Draft specification
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatNo() }}{{ CompatVersionUnknown() }} {{ property_prefix("moz") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatNo() }}{{ CompatNo() }}{{ CompatVersionUnknown() }} {{ property_prefix("moz") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +

Gecko notes

+ +

이 API 는 현재 초안 형태이다. 이것은 오직 B2G 와 안드로이드용 Firefox 에서 prefixed 함수인 (mozOrientation) 로만 구현된다.

+ +

See also

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