TUTORIALReferencesFETCHED
HTML <iframe> marginheight 属性
HTML <iframe> marginheight 属性 HTML <iframe> 标签 实例 带有 50 像素顶部和底部空白边距的 <iframe>: <iframe src='demo_iframe.htm' marginheight='50'> &a..
Updated 7/16/2026
Tutorial detail pages default to noindex.
HTML <iframe> marginheight 属性
浏览器支持
![]()
![]()
![]()
![]()
![]()
所有主流浏览器都支持 marginheight 属性。
定义和用法
HTML5 不支持 <iframe> marginheight 属性。请使用 CSS 代替。
marginheight 属性规定 <iframe> 内容的顶部和底部的空白边距,以像素计。
语法
<iframe marginheight="pixels">
属性值
| 值 | 描述 |
|---|---|
| pixels | 规定 <iframe> 内容的顶部和底部的空白边距,以像素计。 |
HTML <iframe> 标签