HTML DOM
HTMLEmbedElement 接口的 height 属性返回一个反映 embed 元素的 height 属性的字符串,其以 CSS 像素为单位指示资源的显示高度。
值
一个字符串,以 CSS 像素为单位指示资源的显示高度。
示例
<embed id="el" width="800" height="600" />
const el = document.getElementById("el");
console.log(el.height); // 输出:“600”
规范
浏览器兼容性
参见
- HTMLCanvasElement.height
- HTMLIFrameElement.height
- HTMLImageElement.height
- HTMLObjectElement.height
- HTMLSourceElement.height
- HTMLVideoElement.height
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
