[英]how can i override ngx carousel css to disable navigation
I am using ngx carousel in my angular project and want to disable navigation arrows .I have already tried following code but none worked我在我的 angular 项目中使用 ngx carousel 并想禁用导航箭头。我已经尝试过以下代码但没有任何效果
.carousel-control {
display: none;
}
it looks like my css is not able to override the ngx bootstrap css.看起来我的 css 无法覆盖 ngx bootstrap css。 can anyone help me with this谁能帮我这个
try尝试
::ng-deep .carousel-control {
display: none;
}
But FYI ng-deep is not a good way of doing things, ideally there is should be @Input field in that ngx carousel so you can configure navigation.但是仅供参考 ng-deep 不是一个好的做事方式,理想情况下,ngx 轮播中应该有 @Input 字段,以便您可以配置导航。
you can use您可以使用
:host ::ng-deep {
.carousel-control {
display: none;
}
}
If the ::ng-deep combinator is used without the :host pseudo-class selector, the style can bleed into other components.如果在没有 :host 伪类选择器的情况下使用 ::ng-deep 组合器,则样式可能会渗透到其他组件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.