css - 如何删除 Angular Material mat-ink-bar?
问题描述
我无法隐藏墨条。我尝试了许多不同的事情,但没有成功。这是我目前拥有的 CSS,它确实改变了墨条的颜色。我希望禁用并完全隐藏它以消除边框阴影。
/* active tab ink bar */
::ng-deep .mat-ink-bar {
background-color: var(--primary-color,$orange) !important;
display: none !important;
visibility: hidden !important;
transition: none !important;
height: 0px !important;
width: 0px !important;
}
解决方案
我在更改活动选项卡样式时遇到了同样的问题,我使用以下样式修复了它。
:host ::ng-deep .mat-tab-label {
height: 3rem !important;
min-width: 8rem !important;
}
/* Styles for the active tab label */
:host ::ng-deep .mat-tab-label.mat-tab-label-active {
border: 1px solid #2F80ED;
box-sizing: border-box;
border-radius: 0.8rem;
}
/* Styles for the ink bar */
:host ::ng-deep .mat-ink-bar {
display: none !important;
}
推荐阅读
- c++ - string_view 返回在 g++ 9.3.0 中损坏?
- r - 正则表达式从指定模式中提取所有文本,直到 r 中的字符串结尾
- ios - CollectionView reloadData() 奇怪的行为
- powerbi - 如何打破等级权力bi的关系
- wpf - 如何将样式应用于不同的“TextBlock”对象?
- python - 为什么 2D 分配在 Numpy 中不能按预期工作?
- sql - 如何仅使用 Snowflake sql 中的值更新第一个 NULL 列?
- java - 检查数组是否已经在 Java 中创建
- javascript - Vuejs + Firebase Storage 将多个图像上传到 Firebase Storage 并将所有 downloadURL 推送到 Firestore
- ios - 如何从 WKWebView 中获取选定的文本?