【发布时间】:2022-01-25 21:03:14
【问题描述】:
我希望弹出模式占据全高,但是当有一些溢出时它不会。
一旦用户单击卡片,就会显示弹出窗口。下面是用户在没有滚动和有滚动时点击卡片时的行为图像。
父section 设置为relative,子模态设置为absolute。
我正在使用 TailwindCSS 和 VueJS 框架。
家长
<section id="dashboard" class="flex flex-col relative w-full h-full">
<!-- Cards and stuff -->
<div class="flex flex-col flex-auto w-full min-h-min px-5 py-10">
...
</div>
<!-- Modal popup -->
<SummaryPopUp v-if="popup" @popUp="toggle_popup"/>
</section>
子 [弹出]
<div class="absolute flex flex-col w-full h-full justify-center place-items-center bg-gray-400">
<!-- Close button -->
<button type="button">
</button>
</div>
父高度与子模态高度
不滚动 vs 滚动
【问题讨论】:
-
您是否已经尝试过给您的模态
w-screen h-screen或使用absolute inset-0定位它? -
@EdLucas 是的,我有,它也不起作用
标签: javascript html css tailwind-css