4

我试图将 div 菜单放在对象标签上方,但仍位于对象标签下方,以任何方式将其置于 flash 上方。

    <div>
<div class='menu'>menu</div>
<object width="400" height="40"

classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<param nastatime="SRC" value="bookmark.swf">
<embed src="bookmark.swf" width="400" height="40"></embed>
</object>
</div>
<style>
#menu{
width: 100%;
clear: both;
float: left;
position: relative;
background: red;
z-index: 1111111;
}

object{
float: left;
position: absolute;
z-index: -13;
}
</style>
4

2 回答 2

8

嵌入内容时,您需要查看 Flash 的wmode参数。默认设置wmode"window"将内容置于其他所有内容之上。将其设置为"opaque""transparent"允许正确分层。

有关详细信息,请参阅http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html#main_Using_Window_Mode__wmode__values_

于 2012-09-06T09:04:27.407 回答
1

您正在使用类作为菜单,但在 css 中有 #,将其替换为 .Try this css

    <div class="main">
<div class="menu">menu</div>
<div class="fobject"><object width="400" height="40"

classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<param nastatime="SRC" value="bookmark.swf">
<embed src="bookmark.swf" width="400" height="40"></embed>
</object>
    </div>
</div>​​​​​​​​​​​

    .main{
 position:relative   
}
.menu{
width: 100%;
clear: both;
float: left;
position: relative;
background: red;
z-index: 100;
}

.fobject{
float: left;
position: relative;
z-index: 10;
}​
于 2012-09-06T09:00:31.523 回答