使用 css 样式 ng-bootstrap 手风琴 [英] Style ng-bootstrap accordion with css

查看:71
本文介绍了使用 css 样式 ng-bootstrap 手风琴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有手风琴的 Angular 2 组件,我使用 ng-bootstrap 添加了它.在功能上一切正常,但是我尝试使用编译的手风琴元素具有的 .card, .card-header, .card-block 类加载的样式,这些样式不会应用于元素.

I have an Angular 2 component with an accordion, which I added using ng-bootstrap. Everything works fine functionally, however the styles that I try to load using the .card, .card-header, .card-block classes that the compiled accordion elements have, those styles do not get applied to the elements at all.

当将手风琴转换为 div 时,这些类由 ng-bootstrap 直接设置.

These classes are set by ng-bootstrap directly, when transforming the accordion into div's.

我通过链接到组件 TypeScript 文件的 style.scss 文件应用我自己的 css.渲染完所有内容后,我的样式会出现在 html 输出标题的