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>
以上实例输出结果:

更多实例
