简体   繁体   English

如何在移动视图中的 angular 材料对话框内的 position angular 材料选项卡边对边?

[英]How to position the angular material tabs edge to edge inside the angular material dialog in mobile view?

I have been trying to position the angular material tabs inside the angular material dialog but I am facing some issues, well they are positioned edge to edge in a web view inside a dialog but I cannot position them the similar way in a mobile view . I have been trying to position the angular material tabs inside the angular material dialog but I am facing some issues, well they are positioned edge to edge in a web view inside a dialog but I cannot position them the similar way in a mobile view . Normally the mat-tabs are positioned edge to edge when then are used outside the dialog in both mobile and web view but it's not the same case while using them inside the angular material dialog.通常,当在移动视图和 web 视图中的对话框外部使用时,mat-tab 是边对边定位的,但在 angular 材质对话框中使用它们时情况不同。 Below is the output the I am getting下面是我得到的 output 在此处输入图像描述

As you can see they the tabs and its content are not edge to edge there is some white space on the right如您所见,它们的选项卡及其内容不是边缘到边缘的,右侧有一些空白

I am also posting the expected output on mobile view above.我还在上面的移动视图上发布了预期的 output。 在此处输入图像描述

I am also adding the stackblitz link to the code.我还将 stackblitz 链接添加到代码中。 The link might not open in incognito mode so open it in a normal browser window该链接可能无法以隐身模式打开,因此请在普通浏览器中打开它 window
https://stackblitz.com/edit/angular-murusn?file=package.jsonhttps://stackblitz.com/edit/angular-murusn?file=package.json

Help would be appreciated!!帮助将不胜感激!

Here you go...给你 go...

Change the following:更改以下内容:

.mat-dialog-container {
  padding: 0;
}

.mat-dialog-title {
  padding: 24px 24px 0 24px;
}

.mat-dialog-content {
  margin: 0;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM