【发布时间】:2021-07-04 03:10:12
【问题描述】:
我有这个 HTML code here
<div style="width: 150px">
<form class="example-form">
<mat-form-field class="example-full-width">
<input type="text" placeholder="Assignee" aria-label="Assignee" matInput [formControl]="myControl" [matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn">
<mat-option *ngFor="let option of filteredOptions | async" [value]="option">
{{option.name}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
mat-option 的默认行为是使用
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis
-
我想将长句分成下一行,而不是使用
...。样式不起作用:( -
我还需要覆盖我也尝试使用下面代码的字体,但它不会覆盖
mat-option {
font-family: "Times New Roman", Times, serif; // does not work
}
请帮忙。
【问题讨论】:
标签: html css angular sass angular-material