window.screen 对象是否包括整个浏览器 window 或只是它的相同内部部分(网页)
Does the window.screen object include the entire browser window in or just the same inner part of it (web page)
我想知道window.screen对象是否包括设备的整个屏幕,包括浏览器window等
还是只是网页交互的分界部分?
它与文档对象模块有何不同?
让我们看一下 window.screen
对象:
Screen {availWidth: 1920, availHeight: 1040, width: 1920, height: 1080, colorDepth: 24, …}
availHeight: 1040
availLeft: 0
availTop: 0
availWidth: 1920
colorDepth: 24
height: 1080
orientation: ScreenOrientation {angle: 0, type: "landscape-primary", onchange: null}
pixelDepth: 24
width: 1920
__proto__: Screen
这是我 chrome 浏览器中的内容。 (我的屏幕是1920px/1080px
)
正如所见,我们有 Screen
的各种成员,包括全高、宽度以及可用的。 availableHeight
延迟浏览器的 heading/navigating 内容。
我想知道window.screen对象是否包括设备的整个屏幕,包括浏览器window等 还是只是网页交互的分界部分? 它与文档对象模块有何不同?
让我们看一下 window.screen
对象:
Screen {availWidth: 1920, availHeight: 1040, width: 1920, height: 1080, colorDepth: 24, …}
availHeight: 1040
availLeft: 0
availTop: 0
availWidth: 1920
colorDepth: 24
height: 1080
orientation: ScreenOrientation {angle: 0, type: "landscape-primary", onchange: null}
pixelDepth: 24
width: 1920
__proto__: Screen
这是我 chrome 浏览器中的内容。 (我的屏幕是1920px/1080px
)
正如所见,我们有 Screen
的各种成员,包括全高、宽度以及可用的。 availableHeight
延迟浏览器的 heading/navigating 内容。