diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
commit | da78a9e329e272dedb2400b79a3bdeebff387d47 (patch) | |
tree | e6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/web/api/screen/orientation | |
parent | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff) | |
download | translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2 translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip |
initial commit
Diffstat (limited to 'files/ko/web/api/screen/orientation')
-rw-r--r-- | files/ko/web/api/screen/orientation/index.html | 120 |
1 files changed, 120 insertions, 0 deletions
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 +--- +<p>{{APIRef("CSSOM View")}} {{SeeCompatTable}}</p> + +<h2 id="Summary">Summary</h2> + +<p><code>orientation</code> 속성은 화면의 현재 방향을 알려 준다.</p> + +<div class="note"> +<p><strong>Note:</strong> 이 함수는 설치된 웹앱 또는 <a href="/ko/docs/Web/Guide/DOM/Using_full_screen_mode" style="line-height: 1.5em;" title="/ko/docs/Web/Guide/DOM/Using_full_screen_mode">full-screen mode</a> <span style="line-height: 1.5em;">의 웹페이지에서 동작한다.</span></p> +</div> + +<h2 id="Syntax" name="Syntax">Syntax</h2> + +<pre class="eval">var orientation = window.screen.orientation; +</pre> + +<h2 id="Example" name="Example">Return value</h2> + +<p>리턴값은 화면의 방향을 표현하는 문자열이다. portrait-primary, portrait-secondary, landscape-primary, landscape-secondary 가 될 수 있다. (각 값들에 대해 좀 더 많은 정보를 구하려면 {{domxref("window.screen.lockOrientation","lockOrientation")}} 를 보라.).</p> + +<h2 id="Example" name="Example">Example</h2> + +<pre class="brush: js">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"); +} +</pre> + +<h2 id="Specifications" name="Specifications">Specifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{ SpecName('Screen Orientation', '', 'Screen Orientation') }}</td> + <td>{{ Spec2('Screen Orientation') }}</td> + <td>Draft specification</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + +<p>{{ CompatibilityTable() }}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatVersionUnknown() }} {{ property_prefix("moz") }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Chrome for Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatVersionUnknown() }} {{ property_prefix("moz") }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + </tr> + </tbody> +</table> +</div> + +<h3 id="Notes" name="Notes">Gecko notes</h3> + +<p>이 API 는 현재 초안 형태이다. 이것은 오직 <span style="line-height: inherit;">B2G 와 안드로이드용 Firefox 에서 </span><span style="line-height: inherit;">prefixed 함수인 (mozOrientation) 로만 구현된다.</span></p> + +<h2 id="See_also">See also</h2> + +<ul> + <li>{{domxref("window.screen.orientation")}}</li> + <li>{{domxref("window.screen.unlockOrientation()")}}</li> + <li>{{domxref("window.screen.onorientationchange")}}</li> + <li><a href="/ko/docs/Managing_screen_orientation" title="/ko/docs/Managing_screen_orientation">Managing screen orientation</a></li> +</ul> |