在項目中修改ng-zorro組件默認樣式的一些方法:
- 類名等 前加
::ng-deep
构挤; - 類名等 前加
:root
; - 類名等 前加
:host /deep/
唐础;
::ng-deep .ant-spin-dot i {
background-color: #4c7bff;
}
:host ::ng-deep .ant-spin-dot i {
background-color: #4c7bff;
}
:root .ant-select-dropdown {
background-color: #1F273E;
font-size: 14px;
margin-top: 16px;
}
:host /deep/ .ant-spin-dot i {
background-color: #4c7bff;
}
注意:上面三種方法可分別嘗試一下一膨,不同情況下其中之一會生效洒沦。
截止目前最新的7.0.0-rc.0 版本
table組件tbody中的td中的內(nèi)容超出時默認會換行,想要實現(xiàn)xxxx...
的效果需要一個hack:
::ng-deep .ant-table-tbody > tr > td {
max-width: 0;
white-space: nowrap;
}