我有2 div
:
<div id="one"></div>
<div id="two"></div>
通常第二个超过第一个。但我希望第一个留在zorder的前面:
div {
position: absolute;
width: 100px;
height: 100px;
}
#one {
top: 20px;
left: 20px;
background: red;
zorder: 2;
}
#two {
top: 50px;
left: 50px;
background: blue;
zorder: 1;
}
为什么这不起作用?
答案 0 :(得分:0)
这是HTML,所以我想你的意思是z-index
:
#one {
z-index: 2;
}
#two {
z-index: 1;
}