白色bootstrap导航栏转过来透明的段落

时间:2015-06-28 23:48:41

标签: jquery css twitter-bootstrap navbar rgba

我一直致力于导航,一旦滚过标题就会获得不透明度并缩小徽标 - 一切都很好,除非导航栏在白色背景上叠加一段,它变得透明&造成视觉混乱。我猜测使用rgba可能有问题吗?我想保持不透明度,如果有任何建议,将不胜感激。

在这里演示: http://mockturtlesoup.github.io/Hi-Will/#

3 个答案:

答案 0 :(得分:1)

CSS中的z-index属性控制重叠元素的垂直堆叠顺序。此属性没有固定值,但您可以使用更高的值来堆叠其他元素顶部的元素。以下css也可以。

#header {
 z-index: 9;
}

答案 1 :(得分:0)

这不是透明度问题。这是分层问题。将其添加到您的css文件中:

#header {
     z-index: 90;
}

答案 2 :(得分:0)

Actually reason was div and tags overlapping the header you added the z-index property in the **#myNav.affix** there should add  **postion:relative** property then remove the **z-index** and **postion:relative** form the <p> tag  and bootsrap classes also  like col-md-5, because these classes having **postion-realtive** for your reqiurement these are not needed so remove it .am checked itz works fine hope itz works you too .(Y)Try It
相关问题