问题是#one与#three重叠。为什么z-index不工作?
#one {
position: relative;
top: 35px;
z-index: 2;
}<div id="one">one</div>
<div>two</div>
<div id="three">three</div>
发布于 2018-05-31 13:07:04
<html>
<head>
<title>Page Title</title>
<style>#one{position:relative; top:35px; z-index: 1;background:white}
#three{
z-index:-3; background:white}
</style>
</head>
<body>
<div id="one">one</div>
<div>two</div>
<div id="three">three</div>
</body>
</html>https://stackoverflow.com/questions/50616810
复制相似问题