2017-10-14 87 views
-2

我希望我的側邊欄出現在一切之上。我已經設置的z-index至10000,不過,卡重疊它 側邊欄和創始人卡的CSS是爲什麼我的z-index不起作用?我希望我的邊欄能夠顯示所有內容。我已將z-index設置爲10000;但還是卡重疊它

.sidemenu{ 
 
     position: fixed; 
 
\t  top: 0px; 
 
\t  width: 240px; 
 
\t  margin-left: -250px; 
 
\t  overflow: hidden; 
 
\t  height: 100vh; 
 
\t  background: black; 
 
\t  opacity: 1; \t 
 
     z-index: 100000000000000; 
 
\t  transition: all 0.3s ease-in-out; 
 
} 
 
    .founders { 
 
     display: flex; 
 
     flex-wrap: wrap; 
 
     flex-direction: column; 
 
     justify-content: center; 
 
     align-items: center; 
 
     width: 100%; 
 
     height: 100%; 
 
     color: white;  
 
}

+2

可以爲您提供工作代碼..?沒有輸出。 –

+0

提供您的HTML代碼來解決 – PraveenKumar

+0

非常感謝你的幫助 這裏的鏈接頁面 [鏈接](https://codepen.io/poojavpatel71/project/editor/XzxJWR) – Pooja

回答

0

可能是這將有助於

.sidemenu { 
    position: fixed; 
    top: 0px; 
    width: 100%; 
    margin-left: 100vw; 
    overflow: hidden; 
    height: 100vh; 
    background: black; 
    opacity: 1; 
    z-index: 100000000000000; 
    transition: all 0.3s ease-in-out; 
} 

.founders { 
    display: flex; 
    flex-wrap: wrap; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    width: 100%; 
    height: 100%; 
    color: white; 
} 
<div class="sidemenu"> 
    <ul> 
     <li><a href="">Home</a></li> 
     <li><a href="">Home</a></li> 
     <li><a href="">Home</a></li> 
    </ul> 
</div> 
<div class="founders"> 
    <div class="item"> 
     this is founder 
    </div> 
</div> 
+0

謝謝你這麼多響應。 這裏是鏈接到頁面[codepen鏈接](https://codepen.io/poojavpatel71/project/editor/XzxJWR) 你可以檢查一下 – Pooja

相關問題