我如何覆盖 ngx carousel css 以禁用导航
how can i override ngx carousel css to disable navigation
我在我的 angular 项目中使用 ngx carousel 并想禁用导航箭头。我已经尝试了以下代码但 none 有效
.carousel-control {
display: none;
}
看起来我的 css 无法覆盖 ngx bootstrap css。
谁能帮我解决这个问题
尝试
::ng-deep .carousel-control {
display: none;
}
但仅供参考,ng-deep 并不是一个好的做事方式,理想情况下,ngx 轮播中应该有@Input 字段,以便您可以配置导航。
你可以使用
:host ::ng-deep {
.carousel-control {
display: none;
}
}
如果在没有 :host 伪class 选择器的情况下使用 ::ng-deep 组合器,样式可能会渗透到其他组件中。
我在我的 angular 项目中使用 ngx carousel 并想禁用导航箭头。我已经尝试了以下代码但 none 有效
.carousel-control {
display: none;
}
看起来我的 css 无法覆盖 ngx bootstrap css。 谁能帮我解决这个问题
尝试
::ng-deep .carousel-control {
display: none;
}
但仅供参考,ng-deep 并不是一个好的做事方式,理想情况下,ngx 轮播中应该有@Input 字段,以便您可以配置导航。
你可以使用
:host ::ng-deep {
.carousel-control {
display: none;
}
}
如果在没有 :host 伪class 选择器的情况下使用 ::ng-deep 组合器,样式可能会渗透到其他组件中。