Screen pixelDepth 屬性

定義和用法
pixelDepth 屬性返回顯示屏幕的顏色分辨率(比特每像素)。
語法
screen.pixelDepth
瀏覽器支持
Internet Explorer 10, Firefox, Opera, Chrome, 和 Safari 瀏覽器支持 pixelDepth 屬性。
注意:Internet Explorer 9 及更早 IE 版本瀏覽器不支持 pixelDepth 屬性。
提示: colorDepth 屬性和pixelDepth屬性完成同樣的事情。由于所有主流瀏覽器都支持colorDepth,所以都使用該屬性。/p>
實例
實例
返回你的屏幕的顏色分辨率:
<script>
document.write("顏色分辨率: " + screen.pixelDepth);
</script>
document.write("顏色分辨率: " + screen.pixelDepth);
</script>
以上實例輸出結(jié)果:
document.write("顏色分辨率: " + screen.pixelDepth);
嘗試一下 ?

更多實例

更多建議: