HTMLFencedFrameElement:width 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
HTMLFencedFrameElement
的 width
属性用于获取并设置对应 <fencedframe>
元素的 width
属性的值,该属性指定了元素的宽度。
嵌入内容的尺寸可能由 <fencedframe>
的 config
对象的内部 contentWidth
和 contentHeight
属性设置。在这种情况下,更改 <fencedframe>
的 width
或 height
将改变页面上嵌入容器的大小,但容器内的文档将按比例缩放以适应新的尺寸。嵌入文档报告的宽度和高度(即 Window.innerWidth
和 Window.innerHeight
)将保持不变。
值
以 CSS 像素为单位表示元素宽度的字符串。默认值为 300
。
示例
js
const frame = document.createElement("fencedframe");
frame.width = "480";
规范
Specification |
---|
Fenced Frame # dom-htmlfencedframeelement-width |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
width |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
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.