【问题标题】:Collapsed navbar is covering content behind it in bootstrap 3.3.4折叠的导航栏在引导程序 3.3.4 中覆盖其后面的内容
【发布时间】:2015-08-29 02:26:31
【问题描述】:

我正在使用 Bootstrap 3.3.4。我需要导航栏中链接的背景(一旦它在断点处折叠)大约 50% 透明,这样它就不会覆盖它后面的内容。现在,当我点击“菜单”时,一个带有垂直堆叠链接的大块会下降并覆盖它后面的所有内容。

【问题讨论】:

    标签: twitter-bootstrap navbar transparent collapse


    【解决方案1】:

    一旦引导程序达到 768 像素,导航栏就会折叠并在导航栏右侧显示一个图标,该图标允许垂直显示下拉菜单。现在,要将下拉菜单更改为不透明并看到背景 50% 透明,可以将以下代码添加到您的 custom.css。

    @media(max-width:768px) {
        .navbar-inverse {
            background-color: transparent;
        }
        .navbar-collapse {
            background-color: { your choice of color };
            opacity:0.5;
        }
    } 
    

    ...或者如果您只想查看文本背后的背景而不想查看其他内容,请将代码应用到 custom.css 中...

    @media(max-width:768px) {
        .navbar-inverse {
            background-color: transparent;
        }
        .navbar-collapse {
            opacity:0.5;
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-10-29
      • 1970-01-01
      • 2021-08-23
      • 1970-01-01
      • 1970-01-01
      • 2012-11-16
      • 1970-01-01
      相关资源
      最近更新 更多