【发布时间】:2014-10-20 21:19:20
【问题描述】:
我有类似下面的css:
#one{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
}
#two{
position: relative;
z-index: 9;
width: 200px;
height: 200px;
background: red;
}
#link{
position: relative;
z-index: 9999999; /*this is not in higher layer why??? */
}
我无法按照我的设计增加 #two 的 z-index。
但是我已经为#link 分配了更高的z-index,但它没有进入更高的层。
那么,为什么固定位置会阻挡层(z-index)?
如果#one 的位置没有固定,那么它可以正常工作。所以,我的问题是为什么 position fixed 给了我一个错误?
【问题讨论】:
-
@Dwza 有一把小提琴
-
这能回答你的问题吗? z-index not working with fixed positioning
标签: css