HTMLFencedFrameElement: height 屬性

可用性有限

此特性不是基線特性,因為它在一些最廣泛使用的瀏覽器中不起作用。

實驗性: 這是一項實驗性技術
在生產中使用此技術之前,請仔細檢查瀏覽器相容性表格

HTMLFencedFrameElement 介面的 height 屬性用於獲取和設定相應的 <fencedframe> height 屬性的值,該屬性指定了元素的高度。

嵌入式內容的大小可以透過 <fencedframe>config 物件的內部 contentWidthcontentHeight 屬性來設定。在這種情況下,更改 <fencedframe>widthheight 會改變頁面上嵌入式容器的大小,但容器內的文件將被視覺縮放以適應。嵌入式文件報告的寬度和高度(即 Window.innerWidthWindow.innerHeight)將保持不變。

一個字串,表示元素的高度(以 CSS 畫素為單位)。預設值為 150

示例

js
const frame = document.createElement("fencedframe");
frame.height = "320";

規範

規範
圍欄框架
# dom-htmlfencedframeelement-height

瀏覽器相容性

另見