为什么我的z-index不起作用?我希望我的边栏能够显示所有内容。我已将z-index设置为10000;但还是卡重叠它

问题描述:

我希望我的侧边栏出现在一切之上。我已经设置的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

可能是这将有助于

.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