【问题标题】:Why I can't change color of breadcrumb list为什么我不能改变面包屑列表的颜色
【发布时间】:2015-03-09 22:37:25
【问题描述】:

我有面包屑,我的问题是我无法更改面包屑列表的文本颜色。我成功地改变了字体粗细,但是颜色是个问题。 我试着写了color: white;,但是不行,下来是代码。

HTML

<div class="container-fluid footer">
    <div class="row">
        <div class="col-xs-12">

            <img src="img/Gallery/fb.png" alt=""> &nbsp
            <img src="img/Gallery/twitter.png" alt=""> &nbsp
            <img src="img/Gallery/youtube.png" alt=""> &nbsp
            <img src="img/Gallery/myspace.png" alt="">

            <ol class="breadcrumb">
            <li><a class="active">Home</a></li>  &nbsp
            <li><a href="#">Gallery</a></li>  &nbsp
            <li> <a href="#">FAQ</a></li>   &nbsp
            <li> <a href="#">Contact</a></li>
            </ol>

            <p><small>Copyright <span class="glyphicon glyphicon-copyright-mark"></span>  All Right Reserved | Testing Website </small></p>
        </div>
    </div>
</div>

CSS

.col-xs-12 .breadcrumb{
    background-color: #2b2b2b;
    color: white;
    font-family: TW Cen MT;
    font-size:18px;
    font-weight: bold;

}
.breadcrumb > li + li:before {
  content: none;
}

【问题讨论】:

    标签: html css twitter-bootstrap


    【解决方案1】:

    添加这一行然后它可能会正常工作,&lt;a href=""&gt; 标签上有一些默认的 html 样式。

    ol > li > a {color:white}
    

    【讨论】:

    • 谢谢你,我会接受你的回答。你能告诉我,在我想写.breadcrumb之前怎么写,如果你理解我的话
    • 你的意思是.breadcrumb li a {color:white} 这也可能更好。它与&lt;ol&gt; 相同,仅当您定位.breadcrumb 在这种情况下,您只会定位特定的面包屑列表
    【解决方案2】:

    将此添加到您的 CSS:

    .breadcrumb li a    {
        color: white;
    }
    

    【讨论】:

    • 谢谢,但为时已晚,@Paul 速度很快,我会接受他的回答。我接受你的回答像有用的一样再次谢谢你
    猜你喜欢
    • 2021-09-27
    • 2020-10-13
    • 2015-11-14
    • 1970-01-01
    • 2021-04-24
    • 1970-01-01
    • 2021-09-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多