JavaScript

[ScreenOrientation] JS - ScreenOrientation 객체 - 장치 방향 정보 갖는 객체 (= 스크린오리엔테이션 객체)

목차

  1. ScreenOrientation 객체 정의
  2. ScreenOrientation 객체의 속성
  3. ScreenOrientation 객체의 메서드

 

ScreenOrientation 객체 정의

 

ScreenOrientation 인터페이스는 현재 문서가 포함된 화면 방향 정보 제공.

 

※ 3개의 속성(property: 값)과 2개의 메서드(method: 동작) 내장.

 

ScreenOrientation 객체의 속성

 

ScreenOrientation.type

읽기 전용. 장치 방향 표시. 아래 값 중 하나 반환.

  • "portrait-primary"
  • "portrait-secondary"
  • "landscape-primary"
  • "landscape-secondary"

 

ScreenOrientation.angle 속성

읽기 전용. 문서의 현재 방향 각도 반환.


ScreenOrientation.onchange 속성 ★★★

화면 방향 바뀔 때마다 호출되는 이벤트 핸들러.

 

 

ScreenOrientation 객체의 메서드

 

ScreenOrientation.lock() 메서드

포함하는 문서의 방향을 기본 방향으로 잠그고 Promise 반환. 


ScreenOrientation.unlock() 메서드

포함하는 문서의 방향을 기본 방향에서 잠금 해제.

 



분류 제목
DOM_Style JS - imageOrientation -
DOM_Style JS - isolation -
DOM_Style JS - justifyContent 속성 - flex 항목 세로 정렬 설정/반환 (= justifyConte…
DOM_Style JS - left 속성 - 왼쪽기준 (= left속성 = 좌측기준 = 레프트속성, 상속 X)
DOM_Style JS - letterSpacing 속성 ★ - 글자 간격 반환/설정 ( 텍스트사이띄우기 = 문자 간격 = 글…
DOM_Style JS - lineHeight 속성 ★ - 텍스트라인높이 (= line-height속성 = 텍스트줄높이 = 글…
DOM_Style JS - listStyle -
DOM_Style JS - listStyleImage -
DOM_Style JS - listStylePosition -
DOM_Style JS - listStyleType 속성 - 리스트 마커 모양 (= listStyleType속성 / 리스트스타…
DOM_Style JS - margin -
DOM_Style JS - marginBottom -
DOM_Style JS - marginLeft -
DOM_Style JS - marginRight -
DOM_Style JS - marginTop -
63/89
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 2
웹유틸
회원센터
홈짱닷컴 PC버전 로그인