简体   繁体   English

使用 screen.width/screen.height 的值不正确

[英]incorrect values using screen.width/screen.height

I have 4k monitor 3840x2160 but when I use screen.width I get 1920 instead 3840 when I use screen.height I get 1080 instead 2160 why values are incorrect screenshot我有 4k 显示器 3840x2160 但是当我使用 screen.width 我得到 1920 而不是 3840 当我使用 screen.height 我得到 1080 而不是 2160 为什么值不正确截图

There is a similar question with the same problem you can check it from this link:有一个类似的问题,你可以从这个链接检查它:

Shouldn't window.screen.width/height correspond to actual screen width/height? window.screen.width/height 不应该对应于实际的屏幕宽度/高度吗?

Note: I am on mobile idk how to format the answer注意:我在移动 idk 如何格式化答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM