我有一段(.about-info p
),我试图隐藏在另一个元素后面(.about-container
)。我正在尝试对元素进行分层,以使.about-info p
出现在.about-container
的后面,但使用z-index
到目前为止尚未成功。z-index隐藏段落落后其他元素
你能帮我理解为什么吗? site is here。感谢您的想法!
<div class="about-info">
<p>stuff</p>
</div>
<div class="about-container">
More stuff
</div>
.about-container { z-index:9999; position:relative; }
.about-info { background-color: #d7d7d7; z-index:-700; position:relative; }
.about-info p { z-index: -800; position:relative;}
请你也可以把你的代码放在这里 – Pete
不需要它来得到答案。但提供反正坚持 –