日期:2014-05-17  浏览次数:20729 次

html插入swf格式文件,求大神
本帖最后由 u010766076 于 2013-06-03 06:42:30 编辑
插入之后flash文件内容太小,
flash内容想设置的宽度为widht 1280px   height 300px
<embed src="#" width="1280" height="300" />内容还是没有预设的大小。
设置为整个浏览器的窗口可以正常显示,
但是占用整个浏览器,
实际swf内容高度只有半个浏览器左右,

这样就露出半个浏览器是空白页面。
想用一个绝对定位的层覆盖在swf的下半部分,
试了一下但是没效果,求大神解决这个问题


#content{position:absolute;
left:0px;
top:400px;
width:1280px;
height:300px;
z-index:2;}


function load(){
document.getElementById("flash").style.width=window.screen.width+"px";
document.getElementById("flash").style.height=window.screen.height+"px";
}


<body onload="load()">
<div>
<embed src="1.swf" id="flash" width="1280" height="300" type="application/x-shockwave-flash"></embed>
</div>
<div id="content"><hr/></div> 
</body>
HTML SWF Flash

------解决方案--------------------
 <embed src="1.swf" id="flash" width="1280" height="300" type="application/x-shockwave-flash" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>