英文:
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?
答案1
得分: 0
假设您的按钮位于一个mat-dialog-actions
的div
中,您可以通过将以下定义添加到对话框的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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论