【问题标题】:White bootstrap navbar turning transparent over paragraph白色引导导航栏在段落上变为透明
【发布时间】:2015-06-28 23:48:41
【问题描述】:

我一直在研究一种导航,一旦滚动通过标题,它就会变得不透明并缩小徽标 - 一切都很好,除了当导航栏覆盖白色背景上的段落时,它会变成透明并造成视觉混乱.我猜这可能是使用 rgba 的问题?我想保持不透明,如果有任何建议,我将不胜感激。

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

【问题讨论】:

  • 你能创建一个fiddle 来展示这个问题吗?如果你需要占位符图片,我总是使用Placehold.it

标签: jquery css twitter-bootstrap navbar rgba


【解决方案1】:

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

#header {
 z-index: 9;
}

【讨论】:

    【解决方案2】:

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

    #header {
         z-index: 90;
    }
    

    【讨论】:

      【解决方案3】:
      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
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-04-29
        • 1970-01-01
        • 2021-05-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多