css - twitter bootstrap中 "icon-home"的匹配颜色

标签 css colors twitter-bootstrap

我正在尝试使用 Twitter bootstrap 将主页图标的颜色与非事件文本的颜色相匹配,如下所示:

<div class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <ul class="nav">
        <li class="nav_item"><a href="indexdefaults.html"><i class="icon-home icon-gray"></i>Home</a></li>
        <li class="active"><a href="about.html">About</a></li>
      </ul>
    </div>
  </div>
</div>

但是“icon-gray”类比“nav_item”类中的文本暗得多。与 nav_item 文本的颜色匹配的适当类 icon-foobar 是什么?

最佳答案

您可以使用自定义样式获得灰色:

.icon-gray {
  opacity: 0.3;
}

您可能需要根据黑色的重量来降低或提高不透明度。

关于css - twitter bootstrap中 "icon-home"的匹配颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10763768/

相关文章:

html - CSS 组合尺寸、比例和深度是否在插值之前组合?

javascript - 如何检查 CSS 背景色是否为白色?

javascript - 在 JavaScript 中进行原型(prototype)设计以向 Bootstrap 日期选择器添加新方法

html - 管理证明内容 : space-between on last row

javascript - 使用 CSS 以圆形滚动

html - 容器查询

html - 更改悬停链接上 Bootstrap 导航栏的颜色?

linux - 改变鞭尾鱼的颜色

html - Css 布局失败

html - 如何在 Bootstrap 3 输入组中使按钮全宽?