避免零件在角度上重叠 [英] To avoid components overlapping in angular

查看:91
本文介绍了避免零件在角度上重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个名为customer-detailscustomer-bookings的组件,它们由app.component.html文件中的选择器调用,如下面的代码所示

I have two components called customer-details and customer-bookings which are called by their selectors in app.component.html file as shown in below code

     <app-customer-details></app-customer-details>
     <app-customer-bookings></app-customer-bookings>

组件应该看起来像这样(一个在另一个之下).

The components should look like this(i,e one below the other).

但是这样重叠.

在这里我面临着重叠的问题,我试图通过将每个组件的高度设置为 50vh 来解决此问题.但我想解决此重叠问题而无需手动设置高度.

Here i am facing overlapping issues,I tried to solve it by setting height to 50vh for each component. But i want to solve this overlapping issue without setting the height manually.

这是 stackblitz 链接

推荐答案

您应该从表格样式中删除它:

You should remove this from your table style:

position:absolute;

在customer-details.component.css中

in customer-details.component.css

这篇关于避免零件在角度上重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆