twitter-bootstrap Bootstrap - 更改颜色面板-主要
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27877184/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bootstrap - change color panel-primary
提问by Barry The Wizard
I have used panel-primary to make a panel in Bootstrap. But now I want to change the default blue color.
我已经使用 panel-primary 在 Bootstrap 中制作了一个面板。但现在我想更改默认的蓝色。
I have added the css, but with this change the panel keeps the blue color
我已经添加了 css,但是通过这个更改面板保持蓝色
#panel-primary {
background-color: #194719;
}
}
How can I change this blue color?
我怎样才能改变这种蓝色?
回答by haxtbh
panel-primaryis a class.
panel-primary是一个类。
You will need to do it like this:
你需要这样做:
.panel-primary {
background-color: #194719 !important;
}
Replace the #before panel-primarywith a .(leave the #on the colour as is)
用 a替换#之前panel-primary的.(保留#颜色原样)
The #is used when you reference an element ID in CSS. A .will reference a class.
在#当在CSS引用元素ID被使用。A.将引用一个类。

