问题描述
请帮忙,Mat Paginator 背景没有改变,我希望它是透明的,我使用了下面的代码
::ng-deep .mat-paginator {
background-color: transparent;
}
解决方法
大功告成,在这种情况下,您不需要使用 ::ng-deep,它已被弃用。
它不工作的原因是这段代码需要一个叫做 mat-paginator 的类而不是一个标签。因此,删除“。” (点)在你的垫子分页器前面,它会起作用。
你的 CSS:
mat-paginator {
background-color: transparent;
}