HTML:标记语言
CSS:样式语言
JavaScript:脚本语言
Web API:编程接口
所有 Web 技术
学习 Web 开发
发现我们的工具
更好地了解 MDN
此特性已相当成熟,可在许多设备和浏览器版本上使用。自 2015 年 7 月以来,各浏览器均已提供此特性。
HTMLIFrameElement 接口的 height 属性返回一个字符串,该字符串反映了 <iframe> 元素的 height 属性,表示框架的高度(以 CSS 像素为单位)。
HTMLIFrameElement
height
<iframe>
一个字符串,表示框架的高度(以 CSS 像素为单位)。
<iframe id="el" width="800" height="600"></iframe>
const el = document.getElementById("el"); console.log(el.height); // Output: '600'
加载中…
HTMLCanvasElement.height
HTMLEmbedElement.height
HTMLImageElement.height
HTMLObjectElement.height
HTMLSourceElement.height
HTMLVideoElement.height