为angularjs覆盖bootstrap中的Bootstrap手风琴颜色 [英] Override Bootstrap Accordion colors in bootstrap for angularjs
问题描述
我是angularjs / bootstrap的新手,我正在尝试创建一个使用引导手风琴列表的SPA。我正在尝试更改整个手风琴标签的颜色,但是,它只是更改了手风琴空间的一部分。我在网上看了这个问题(使用angualr ui引导程序将类添加到手风琴标题吗?)就是Jsfiddle( http:// jsfiddle .net / Zmhx5 / 3 / )完美地代表了我的问题,但没有说明解决方案。
I'm new at angularjs/bootstrap and I'm trying to create a SPA that uses bootstrap accordion lists. I'm trying to change the color of the whole entire accordion tab, however, it's only changes part of the accordion space. I looked online and this question (Add class to accordion heading using angualr ui bootstrap?) and it's Jsfiddle (http://jsfiddle.net/Zmhx5/3/) represent my problem perfectly, but does not explain the solution.
我尝试使用Firebug查明幕后发生的事情,它说整个手风琴选项卡都为。我有一个覆盖该样式的css类,但是由于某种原因,某些东西正在覆盖它。
I tried using firebug to find out what's going on behind the scenes, and it says the whole entire accordion tab is "". I have a css class that overwrites that style, but for some reason, something is overriding it.
.panel-heading {
background-color: red;
}
该网站提供了有关手风琴的教程,其css只是覆盖了手风琴( http://patternry.com/p=accordion/ )。我尝试做同样的事情,但是没有用,请帮助:/
This website has a tutorial on accordions and its css simply overwrote it (http://patternry.com/p=accordion/). I tried doing the same but it did not work, please help :/
推荐答案
在这种情况下,您应该使用scss。
You should use scss in this case.
<div class="custom">
<accordion>
...
</accordion>
</div>
在CSS中,您需要定义。
In css you will need to define.
.custom {
.panel-heading: {
background-color: red !important;
}
}
这篇关于为angularjs覆盖bootstrap中的Bootstrap手风琴颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!