mat-form-field
我使用有内部的常规textarea
。我的问题是这个 Textarea 的占位符文本相当长。在空间更有限的移动设备中,此占位符文本会被 Angular Material 截断并带有省略号。
我希望通过向下移动到下一行来调整占位符文本以适应空间限制。因此,例如,而不是:
This is a really long text and it cannot fit on a single li...
我想:
This is a really long text and it cannot fit on a single
line
我已经尝试了各种方法来更改 and 的 CSS,但mat-input-placeholder
没有mat-input-placeholder-wrapper
成功。我知道解决方案的一部分涉及更改 text-overflow 属性(如下),但我无法获得其他部分。
::ng-deep .mat-input-placeholder {
text-overflow: clip;
}
任何人都可以帮忙吗?
谢谢!