【发布时间】:2021-12-14 04:00:43
【问题描述】:
我想要一个“标题”越过顶部。
诀窍是主容器不能真正改变。
这可能吗?
我目前的代码如下:
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"/>
<div class="h-screen">
<div class="h-full">
<div class="flex flex-auto overflow-x-auto overflow-y-hidden bg-gray-50 h-full">
<div
class="relative flex flex-col ml-2 my-2 overflow-hidden bg-white rounded-lg shadow bg-gray-200"
style="width:300px;min-width: 300px;"
>
<div
class="text-center font-semibold bg-gray-200 h-4 p-2 text-2xl"
style="min-height:3rem"
>Stuff</div>
<div class="flex flex-col overflow-x-hidden overflow-y-auto bg-gray-200 p-2 h-full"></div>
</div>
<div
class="relative flex flex-col ml-2 my-2 overflow-hidden bg-white rounded-lg shadow bg-gray-200"
style="width: 300px; min-width: 300px;"
>
<div
class="text-center font-semibold bg-gray-200 h-4 p-2 text-2xl"
style="min-height:3rem"
>More Stuff</div>
<div class="flex flex-col h-full"></div>
</div>
</div>
</div>
</div>
【问题讨论】:
标签: css tailwind-css