screen示例

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<script>
console.log(screen.height); // 示例结果:900
console.log(screen.availHeight); // 示例结果:870
console.log(screen.colorDepth); // 示例结果:24
console.log(screen.pixelDepth); // 示例结果:24
</script>
</body>
</html>

猜你喜欢

转载自www.cnblogs.com/jiaqi818/p/12785981.html