【发布时间】:2021-09-23 14:16:45
【问题描述】:
我无法将文本向右移动。
<mat-form-field class="form-control">
<mat-label>Move this text:</mat-label>
<input type="text" required
placeholder=""
aria-label="Move this text:"
matInput
(input) = "onValueChanged()"
[formControl]="myControl"
[(ngModel)]="thisVal"
[matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="onSelect($event)" [displayWith]="displayValueName.bind(this)">
<mat-option *ngFor="let option of options| async" [value]="valueOption" >
{{option.name}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
它的样子:
到目前为止我所做的最好的是:
.mat-form-field-label.ng-star-inserted.mat-empty.mat-form-field-empty{
margin-left: 7px;
}
我的问题是在屏幕 3 和 5 上设置“移动此文本”标签。没有第 4 个屏幕行为。 仅当:area-expanded=false 且不专注于输入时。
你知道怎么做吗?
【问题讨论】:
标签: html angular twitter-bootstrap sass