Window screen.pixelDepth 속성
- 이전 페이지 height
- 다음 페이지 width
- 上一层으로 돌아가기 Window Screen
정의와 사용법
pixelDepth
속성은 스크린의 색 분해능을 반환
pixelDepth
속성은 픽셀 비트 단위의 색 분해능을 반환
pixelDepth
속성은 읽기 전용입니다.
자세히 보기:
screen.colorDepth 속성
안내:
Internet Explorer 9 및 이전 버전은 지원하지 않습니다 pixelDepth
속성
하지만pixelDepth
그리고 colorDepth
동일한 값을 반환
모든 브라우저가 지원하기 때문에 colorDepth
이 속성을 사용해 주세요.
인스턴스
예제 1
스크린의 색 분해능을 가져오기
let depth = screen.pixelDepth;
예제 2
모든 스크린 속성:
let text = "Total width/height: " + screen.width + "*" + screen.height + "<br>" "Available width/height: " + screen.availWidth + "*" + screen.availHeight + "<br>" "Color depth: " + screen.colorDepth + "<br>" "Color resolution: " + screen.pixelDepth;
문법
screen.pixelDepth
반환 값
타입 | 설명 |
---|---|
숫자 |
각 픽셀 비트의 색 분해능: 1, 4, 8, 15, 16, 24, 32, 또는 48. |
브라우저 지원
모든 브라우저가 지원 screen.pixelDepth
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
지원 | 지원 | 지원 | 지원 | 지원 | 지원 |
- 이전 페이지 height
- 다음 페이지 width
- 上一层으로 돌아가기 Window Screen