ScreenDetailed: availTop 属性
ScreenDetailed 接口的只读属性 availTop 是一个数字,表示操作系统虚拟屏幕布局中可用屏幕区域的 y 坐标(顶部边缘),相对于 多屏起点。
这等于 ScreenDetailed.top 属性,加上在屏幕顶部绘制的任何操作系统 UI 元素的高度。Windows 不能放置在这些区域,因此 availTop 有助于确定实际可用于打开或放置窗口的区域的顶部边界。
值
一个数字。
示例
窗口管理 API 示例
js
// Available in browsers that support the Window Management API
const screenDetails = await window.getScreenDetails();
// Return the availTop value of the first screen
const screen1AvailTop = screenDetails.screens[0].availTop;
非标准示例
js
// Available in all browsers
// Return the availTop value of the current screen
const screenAvailTop = window.screen.availTop;
规范
| 规范 |
|---|
| 窗口管理 # ref-for-dom-screendetailed-availtop |
浏览器兼容性
加载中…