【发布时间】:2021-11-14 04:00:50
【问题描述】:
【问题讨论】:
-
尝试将 CSS 上的行高设置为更大的值,可能是 5 到 10 像素。您可以使用相同的名称覆盖默认 css - 您可以直接从 chrome 开发工具之类的工具中获取它们。
-
您好,感谢您的回复。哪个类的行高?
标签: angular datepicker
【问题讨论】:
标签: angular datepicker
在组件css文件中:
mat-form-field {
line-height 55px !important;
}
or
mat-label{
line-height 55px !important;
}
或
::ng-deep mat-form-field {
line-height 55px !important;
}
or
::ng-deep mat-label {
line-height 55px !important;
}
小心后者,因为它是通用的。您可能必须使用元素的 css 顺序。就像我说的那样,最好的办法是使用 chrome 开发工具查看它,以便获得准确的类图。
【讨论】:
我的临时解决方案是使用
.mat-form-field-appearance-fill .mat-form-field-label-wrapper{ overflow: visible!important; }
【讨论】: