您的位置:首页 > Web前端 > HTML

在html页面中嵌入flash,让图片遮盖flash的一部分

2009-07-14 15:19 225 查看
整了两天,好久没有写静态页面了。先是不知道怎么弄flash、图片怎么叠起来,后来查查资料弄出来,还是有个问题一直没解决,就是flash老遮盖层,不管你怎么设置position和z-index、方向属性,都没那效果。问群里,都忙着,后只得自已去解决,俗话说:‘自已动手,丰衣足食’。 在网上多次查找想要的东西,这次找到了,在google找到

IE浏览器下可用
<param name="wmode" value="transparent" />

  firefox下可用
<embed src="http://www.knowsky.com/YourFlash.swf" wmode="transparent" >
...
</embed>

但我不知道在ie中那加在哪,试试加了也失败,然后就加个firefox的,就加 wmode="transparent" ,在ie,firefox都成功,没有分哪种浏览器的。

以下是代码:

<div id="header" style="text-align:center;">

<div style="position:relative;width:900px;z-index:2; bottom:-288px;">
<img src="head_banner.png" width="900" height="172"/>
</div>

<div style="position:relative;width:900px;z-index:1;top:-172px;">
<embed src="head.swf" width="900" height="427" wmode="transparent" ></embed>
</div>
<!-- end #header -->
</div>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: