Latest web development tutorials

HTML iframe marginheight 屬性

HTML iframe 標籤參考手冊 HTML <iframe>標籤

實例

帶有50 像素頂部和底部空白邊距的<iframe>:

<iframe src="demo_iframe.htm" marginheight="50">
</iframe>

嘗試一下»

瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流瀏覽器都支持marginheight 屬性。


定義和用法

HTML5不支持<iframe> marginheight屬性。 請使用CSS代替。

marginheight 屬性規定<iframe> 內容的頂部和底部的空白邊距,以像素計。


語法

<iframe marginheight="pixels">

屬性值

描述
pixels 规定 <iframe> 内容的顶部和底部的空白边距,以像素计。


HTML iframe 標籤參考手冊 HTML <iframe>標籤