簡體   English   中英

Z索引不適用於具有絕對定位的FireFox

[英]Z-index not applying in FireFox with absolute positioning

因此,我在這里檢查了其他一些問題,其中大多數提到Firefox的z-index問題往往與以下事實有關position:Absolute項目之一不是position:Absolute

<div id="AnimatedBanner" style="right:-5px;">
                        <object style="position:absolute; z-index:-1" width=" 1175" height="400" data="images/AnimatedBanner.swf"></object>
                    </div>
                    <div class="banner_text" style="position:absolute; z-index:1;">
</div>

然而,它始終奠定了Animatedbanner上的頂部banner_text 它在所有其他瀏覽器中都可以正常工作,但是我仍然不確定為什么它不能在firefox中使用。

經過位搜索后,我發現解決方案應將“ wmode”設置為“ transparent”,因此您的代碼應為:

<object style="position:absolute; z-index:-1" width=" 1175" height="400" data="images/AnimatedBanner.swf">
  <param name="wmode" value="transparent">
</object>

您可以在ff上測試這個小提琴:

http://fiddle.jshell.net/h56q3n09/3/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM