单击“角度材质选择”元素后,如何删除焦点下划线?我附上了代码。我将不胜感激。谢谢!
<mat-form-field>
<mat-label>Selected account</mat-label>
<mat-select matInput>
<mat-option *ngFor="let account of accounts" [value]="account.value">
{{account.viewValue}}
</mat-option>
</mat-select>
</mat-form-field>
答案 0 :(得分:1)
添加以下内容:
name.component.css:
::ng-deep .mat-form-field.mat-focused .mat-form-field-underline {
display: none;
}