Z-index不工作 [英] Z-index not working
问题描述
查看我正在处理的此页面: http://s361608839.websitehome.co .uk / textcube /
导航条在滑块后面,我想要它坐在上面。我尝试在#navbar和#navbar-inner上设置高z索引,没有发生任何事。
#navbar {
background:url(../ images / nav-bg.png)repeat-x;
height:55px;
margin:0;
padding:0;
z-index:9999;
}
#navbar-inner {
宽度:912px;
margin:0 auto;
position:relative;
z-index:9999;
}
我认为javascript滑块使用CSS样式.bx-window和.bx-窗口是原因,但我已经设置了一个低Z-索引两者,但我没有看到任何差异。
帮助这将肯定是适当的。 p>
干杯
这里是一篇文章 http:/ /www.w3.org/TR/CSS2/visuren.html#z-index 在您的情况下,您忘记添加 Take a look at this page I'm working on: http://s361608839.websitehome.co.uk/textcube/ The nav bar is going behind the slider and I wanted it to sit above instead. I've tried setting a high z-index on the #navbar and #navbar-inner and nothing happened. I think the javascript slider using CSS style .bx-window and .bx-window are the cause however I have set a low z-index on both, yet I don't see any difference. Help with this would definately be appeciated. Cheers Here's an article http://www.w3.org/TR/CSS2/visuren.html#z-index In your case, you forgot to add 这篇关于Z-index不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! z-index
仅适用于定位元素(
position:absolute
, position:relative
)。
position
到您的元素之一。#navbar{
background: url(../images/nav-bg.png) repeat-x;
height: 55px;
margin: 0;
padding: 0;
z-index: 9999;
}
#navbar-inner{
width: 912px;
margin: 0 auto;
position: relative;
z-index: 9999;
}
z-index
works only with positioned elements (position:absolute
, position:relative
).position
to one of your element.