以像素为单位设置 iframe 高度
Set iframe height in pixels
我想在我的页面上显示一个高度为 72 像素的顶部栏,然后加载一个 iframe,在其下方填充整个页面(减去顶部栏的高度)。
在我开始考虑我的顶部栏之前...我的 iframe 以某种方式忽略了我设置的任何高度属性:
width='100%' height='1200' style='overflow:hidden;height:100%;width:100%'
or
width='100%' height='100%' style='overflow:hidden;height:100%;width:100%'
我一直在读这个post:Full-screen iframe with a height of 100%
但运气不好。现场观看:http://www.trouwlocaties.com/extpage.aspx?id=315&t=1
首先尝试从 style
中删除 height:100%
,现在 iframe 的高度应该是 1200px。
我想在我的页面上显示一个高度为 72 像素的顶部栏,然后加载一个 iframe,在其下方填充整个页面(减去顶部栏的高度)。
在我开始考虑我的顶部栏之前...我的 iframe 以某种方式忽略了我设置的任何高度属性:
width='100%' height='1200' style='overflow:hidden;height:100%;width:100%'
or
width='100%' height='100%' style='overflow:hidden;height:100%;width:100%'
我一直在读这个post:Full-screen iframe with a height of 100%
但运气不好。现场观看:http://www.trouwlocaties.com/extpage.aspx?id=315&t=1
首先尝试从 style
中删除 height:100%
,现在 iframe 的高度应该是 1200px。