如何在Angular 8中增加mat-dialog-actions的宽度

huangapple go评论82阅读模式
英文:

How to increase the width of mat-dialog-actions in Angular 8

问题

我需要使用整个对话框窗口空间,以便取消和保存按钮都能够利用。

有人可以帮我吗?

英文:

I need to use the entire dialog window space to utilize by both cancel and save buttons.

Can anyone help me on this?

如何在Angular 8中增加mat-dialog-actions的宽度

答案1

得分: 0

假设您的按钮位于一个mat-dialog-actionsdiv中,您可以通过将以下定义添加到对话框的CSS文件中来实现这一点。

button {
  flex-grow: 1;
}

请查看以下StackBlitz

英文:

Assuming that your buttons are contained in a mat-dialog-actions div, you can do this by simply adding the following definition to the CSS file of your dialog.

button {
  flex-grow: 1;
}

Please have a look at the following StackBlitz

huangapple
  • 本文由 发表于 2020年1月6日 14:43:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/59607757.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定