这就是你要找的……?:O
<div id="container">
<div id="header"> <p align="center"> Header</p> </div>
<div id="content">
<object width="400" height="80%"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<param name="SRC" value="bookmark.swf">
<embed src="bookmark.swf" width="100%" height="80%"></embed>
</object>
</div>
<div id="footer"> <p align="center"> Footer</p> </div>
或者
你可以使用javascript
方法。首先找出页眉和页脚之间的间距,然后调整 Flash 的大小。以下脚本可能会对您有所帮助。
<script>
function myFunction()
{
// get the heights //
var containerHeight = document.getElementById("container").offsetHeight;
var headerHeight = document.getElementById("header").offsetHeight;
var footerHeight = document.getElementById("footer").offsetHeight;
// get the vertical spacing //
var height_of_flash = containerHeight-(headerHeight+footerHeight);
// set the heights //
var e1 = document.getElementById("object_swf");
e1.style.height = height_of_flash;
}
</script>