Screen.availHeight
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
概述
返回浏览器窗口在屏幕上可占用的垂直空间,即最大高度。
语法
iAvail = window.screen.availHeight
示例
js
if (window.screen.availHeight !== window.screen.height) {
// something's in the way!
// use available to size window
}
规范
Specification |
---|
CSSOM View Module # dom-screen-availheight |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
availHeight |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.