我正在尝试使用 z-index 创建一个分层的 div,其中一个图层必须包含一个 flowplayer。正确创建图层后,我将根据程序逻辑更新 div 的 z-index 值。以下代码在 Chrome 中有效,但在 Firefox 和 IE 中无效。
问题:在 IE 和 firefox 中,包含 flowplayer 的 div 不隐藏。
<div id="dvd_supplement" style="height:200px;width:300px;">
<!-- this A tag is where your Flowplayer will be placed. it can be anywhere -->
<div style="z-index:11;position:relative;top:0px;">
<a id="player"
href="barsandtone.flv"
style="width:300px;height:200px"
>
</a>
</div>
<div style="z-index:2;position:relative;top:-200px;">
<img id="player_laptop_screen" src="images/laptop_screen.jpg" width="300px" height="200px"/>
</div>
<div style="z-index:3;position:relative;top:-400px;">
<img id="player_img" src="images/blank_screen.jpg" width="300px" height="200px"/>
</div>
</div>
最佳答案
我已经通过在 flowplayer() 中使用 wmode 选项解决了这个问题,即 流量播放器( “播放器”,{src:“../flowplayer/flowplayer-3.2.16.swf”,wmode:“不透明”},{ 夹子: { 自动播放:假, 自动缓冲:真 } } );
关于html - z-index 不适用于 firefox 中的 flowplayer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19761773/