【问题标题】:Twitter Bootstrap Responsive Navigation (btn-navbar, icon-bar) color changesTwitter Bootstrap 响应式导航(btn-navbar、icon-bar)颜色变化
【发布时间】:2014-07-31 18:06:20
【问题描述】:

我正在使用 Bootstrap 并专注于移动导航。悬停时,图标(三条水平线)具有灰色背景色;但是,背景颜色仅位于图标的一半(见图)。我不介意这种背景颜色,但我想超过顶部圆边的完整图标,因为它们在底部。我怎样才能做到这一点?任何想法/建议表示赞赏。

【问题讨论】:

  • 你的代码在哪里?你试过什么?

标签: html css sass less twitter-bootstrap-rails


【解决方案1】:

您需要更改为图标栏颜色,显示在:

<span class="icon-bar"></span>

用 CSS 设置你想要的颜色

.navbar-default .navbar-toggle .icon-bar {
    background-color: #fff;
}

您还可以设置按钮的背景颜色。

.navbar-toggle {
    background-color: #666;
}

如果你想改变焦点颜色,那么只需调整 Bootstrap 中的 :focus 标签:

.navbar-toggle:focus {

// set the new color here for focus

}

.navbar-toggle:focus .icon-bar {

// here for the 3 white Stripes

}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-09
    • 2012-06-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-23
    相关资源
    最近更新 更多