angular - 如何使用 labelPosition ="bottom"更改 Material 步进线样式

标签 angular angular-material

我不会创建这样的风格:

enter image description here

我尝试为已编辑步骤下的所有行设置样式,但有一些行位于 mat-step-headers 之外。

::ng-deep .mat-horizontal-stepper-header {
    &[ng-reflect-state='edit'] + .mat-stepper-horizontal-line {
               border-top-width: 4px;
               border-top-color: blue;
    }
}

这是结果:

enter image description here

那么,我怎样才能做到呢?

最佳答案

标题中的行头和行尾。您可以将此类与反射状态一起使用。

.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before, [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before { 
  border-top-width: 4px;
  border-top-color: blue;
}

.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after, [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after {
  border-top-width: 4px;
  border-top-color: blue;
}

.mat-stepper-horizontal-line {
  border-top-width: 4px;
  border-top-color: blue;
}

关于angular - 如何使用 labelPosition ="bottom"更改 Material 步进线样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56527550/

相关文章:

Angular 6 Material 树

Angular 7 Route 动画在嵌套路由器 socket 中不起作用

Angular 9 : Cannot read property 'pipe' of undefined at MatSelect. ngAfterContentInit

angular 4 "Cannot read property ' toggle' of undefined",同时使用 *ngIf ="sidemenuu == true"到侧边菜单

angular - 如何以交替颜色显示 ionic 行中的 ionic 项目?

javascript - 如何使 htmlinfowindows 中的按钮调用 .ts 传递参数中的函数?

angularjs - Angular JS Material mdMedia 似乎不起作用

css - Flex 无法按预期使用嵌套 Angular Material 布局

angular - 垫子工具栏对齐中的 Material 图标中的文本

html - 如何使功能成为指令,我必须在其他组件中使用它