首页->FLASH下的文字如何放到FLASH上面来
|
|
2使用iframe 使用iframe的方式可以同时支持firefox跟IE,但是实现方式略有不同。原理都是先用iframe盖住flash,然后设置iframe的z-index使div能盖住这个iframe。但是在firefox中iframe 默认状态下不能盖住 flash,需要将flash所在层的overflow属性设为auto,IE下没有此问题。
a. 在firefox中的示例代码
<html>
<head>
<title>div cover flash with iframe</title>
</head>
<body>
<div id="cover_div" style="position:absolute;width:100px;height:100px;background-color:blue;z-index:9">I cover the Flash.</div>
<div style="overflow:auto;">
<iframe id="cover_iframe" frameborder="0" style="position:absolute;width:100px;height:100px;z-index:8;"></iframe>
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='580px' height='180px'>
<param name='movie' value='你的FLASH文件' />
<param name='quality' value='high' />
<embed src='你的FLASH文件' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='580' height='180'> </embed>
</object>
</div>
</body>
</html>
注: “<div style=”overflow:auto;”><iframe>…</iframe><object>…</object></div>” firefox 中必须使用这种结构才有效在IE中只需要使iframe与div在一个同一个位置即可。