【发布时间】:2018-09-25 05:49:13
【问题描述】:
我有 2 个组件 称为 1) add-customer 2)edit-customer
我正在使用它们各自的选择器在 app.component.html 文件中显示这两个组件,如下面的代码所示。
<app-add-customer></app-add-customer>
<app-edit-customer></app-edit-customer>
问题在于,edit-customer 组件与 add-customer 组件略有重叠,如下图所示。
我想我缺少一些 css,我尝试了 position 属性,仍然没有结果。这是stackblitz 链接。
【问题讨论】:
-
你想移动编辑组件吗?
-
我想将
edit-customer组件移到add-customer组件下方。您可以在图像中看到 save & cancel 按钮属于“add-customer”组件,它们仍然显示在“edit-customer”中。 -
查看答案
-
你已经给出了margin-bottom,我不想使用margin属性来对齐它们。我是怎么得到答案的,谢谢。
标签: css angular angular-material