我有一個Divi WordPress網站http://linden.flywheelsites.com,我試圖讓元素ID「atlas_menu1」重疊頁面上的所有其他元素。不知何故,元素「et-page-area」或「main-content」仍然與atlas_menu1重疊。不能讓元素重疊另一個
任何人都可以看看頁面檢查器,看看你能找到解決方案嗎?如有必要,我可以提供訪問權限
我有一個Divi WordPress網站http://linden.flywheelsites.com,我試圖讓元素ID「atlas_menu1」重疊頁面上的所有其他元素。不知何故,元素「et-page-area」或「main-content」仍然與atlas_menu1重疊。不能讓元素重疊另一個
任何人都可以看看頁面檢查器,看看你能找到解決方案嗎?如有必要,我可以提供訪問權限
你能看一眼.et_pb_text_3?它有顯示:無。對不起,這個答案。我還不能評論。
請記住,只有具有z-index的元素在其相同級別上「起作用」。
例如:
.parent{position:absolute;width:100px;height:100px;}
.child{background:red;position:absolute;width:50px;height:50px;margin:auto;top:0;right:0;bottom:0;left:0;z-index:999999;}
.first{z-index:1;background:blue;}
.second{z-index:2;left:50px;top:50px;background:yellow;}
.third{z-index:3;left:100px;top:100px;background:green;}
.fourth{z-index:4;left:150px;top:150px;background:purple;}
<div class="parent first">
<div class="child"></div>
</div>
<div class="parent second">
<div class="child"></div>
</div>
<div class="parent third">
<div class="child"></div>
</div>
<div class="parent fourth">
<div class="child"></div>
</div>
所有子類有999999的Z-index,但是,較低的z-index的父類,停留在孩子的頂部。這是因爲一旦你嵌套了z-index元素,一個子元素就不能重疊父元素。
在你的情況下,#atlas_menu1(z-index:9999)
裏面.et_pb_row_2(z-index:1)
是內部.et_pb_section_4(z-index:-1)
嘗試取出.et_pb_section_4
和.et_pb_text_3
的z-index,然後設置.et_pb_row_2
的z-index到99999
我,不管我」所有其他元素的z-index較低,atlas_menu1較高,結果相同。 –
@MatthewWalker你在測試什麼瀏覽器,因爲我無法用Chrome或Safari重現它。 – Ryan