发表于 2024年7月4日1年前 请教下大们,页面布局如下,为啥页面高度比屏幕调试多了 60px ,60px 也就是 TopNav 的高度。-------------------------------------------- | | TopNav |----------------------------------- | | |SideBar | | | | | | | |----------------------------------------------SideBar className="flex flex-col justify-between top-0 left-0 h-full w-16"TopNav className="w-full h-[60px] m-0 p-0 bg-stone-50"layout.tsx :<div className="flex flex-row"> <div className=""> <Sidebar /> </div> <div className="w-full"> <div className="flex flex-col justify-start text-center"> <TopNavBar/> <div className="w-full"> {children} </div> </div> </div></div>
--------------------------------------------
|
| TopNav
|-----------------------------------
|
|
|
SideBar |
|
|
|
|
|
|
|
----------------------------------------------
SideBar className="flex flex-col justify-between top-0 left-0 h-full w-16"
TopNav className="w-full h-[60px] m-0 p-0 bg-stone-50"
layout.tsx :
<div className="flex flex-row">
<div className="">
<Sidebar />
</div>
<div className="w-full">
<div className="flex flex-col justify-start text-center">
<TopNavBar/>
<div className="w-full">
{children}
</div>
</div>
</div>
</div>