我无法通过 css 隐藏 ngb-carousel 指示器和 prev-next 控件,
定位 css 类是行不通的。
有什么选项可以隐藏它吗?
为了影响 ng-bootstrap 组件的 css,您必须禁用 ViewEncapsulation。
从 @angular/core 导入它:
import { ViewEncapsulation } from '@angular/core'
然后在 @Component 声明中为此组件禁用它:
@Component({
encapsulation: ViewEncapsulation.None,
selector: 'your-template-name',
styleUrls: ['your-template-name.component.scss'],
template: `
... `
})
然后,您可以按照您在 css 文件中的预期定位 Bootstrap 类等。
您希望在每个组件的基础上禁用此功能,并且仅在需要时才禁用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)