English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
colorDepth읽기 전용 속성으로 화면의 색상 깊이를 반환합니다.
단일 픽셀의 색상을 나타내는 비트 수.
colorDepth는 장치 화면이 생성할 수 있는 색상의 종류를 나타냅니다.
예를 들어, 색상 깊이가8의 화면은 생성할 수 있습니다256색상의 종류2 8)。
screen.colorDepth
var x = "Color Depth: " + screen.colorDepth;테스트 보기‹/›
모든 브라우저는 colorDepth 속성을 완전히 지원합니다:
속성 | |||||
colorDepth | 는 | 는 | 는 | 는 | 는 |
반환 값: | 이미지를 표시하는 팔레트의 비트 깊이를 픽셀 단위로 나타내는 숫자. 가능한 값:
|
---|
이 예제는 모든 스크린 속성을 표시합니다:
var txt = ""; txt += "<p>Total width/height: " + screen.width + "*" + screen.height + "</p>"; txt += "<p>Available width/height: " + screen.availWidth + "*" + screen.availHeight +"</p>"; txt += "<p>Color depth: " + screen.colorDepth + "</p>"; txt += "<p>Color resolution: " + screen.pixelDepth + "</p>"; document.write(txt);테스트 보기‹/›
screen 참조:screen.availHeight 속성
screen 참조:screen.availWidth 속성
screen 참조:screen.height 속성
screen 참조:screen.width 속성
screen 참조:screen.pixelDepth 속성