【问题标题】:Changing color for hamburger icon of Bootstrap更改 Bootstrap 汉堡包图标的颜色
【发布时间】:2021-03-17 23:34:49
【问题描述】:

我在我的 HTML 代码中使用 Bootstrap 导航栏

汉堡菜单图标的默认颜色是黑色。 我正在尝试将其更改为同时颜色。 但它不起作用

<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
                aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span id="toggle-icon" class="navbar-toggler-icon"></span>
            </button>

这是 CSS 代码

.navbar-toggler-icon .navbar-toggler{
    color: #ffff !important ;
}
.navbar-toggle span{
  color: #ffff !important ;
}
#toggle-icon {
  color: #ffff !important ;
}

【问题讨论】:

    标签: html css bootstrap-5


    【解决方案1】:

    我更改了引导程序中的导航栏类,使汉堡图标变为白色 从 : navbar-light 到 navbar-dark

    【讨论】:

      猜你喜欢
      • 2020-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-12
      • 2019-11-20
      • 2015-11-20
      相关资源
      最近更新 更多