避免组件在角度上重叠 [英] To avoid components overlapping in angular
问题描述
我有两个名为 customer-details
和 customer-bookings
的组件,它们在 app.component.html
文件中被它们的选择器调用为如下代码所示
但它像这样重叠.
这里我面临重叠问题,我试图通过将每个组件的 height 设置为 50vh 来解决它.但我想在不手动设置高度的情况下解决这个重叠问题.
这是 stackblitz 链接.
解决方案 你应该从你的表格样式中删除它:
位置:绝对;
在 customer-details.component.css 中
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).
But it is overlapping like this.
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.
Here is the stackblitz link.
解决方案 You should remove this from your table style:
position:absolute;
in customer-details.component.css
这篇关于避免组件在角度上重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!