如何確保我的網站在各種螢幕尺寸下完美展示?
<p>我正在嘗試理解TailwindCSS,目前正在嘗試製作<strong>響應式員工卡</strong>。但我最近遇到的問題是,我的卡片在Tailwind的所有斷點上都是響應式的,但<strong>只有當高度為900時。 </strong>每當我增加高度時,底部會有更多空間,而當我縮小視窗高度時,內容會溢出。 </p>
<p><strong>如何使其適應所有高度和寬度? </strong></p>
<p>[<strong>只有當高度為900且在Tailwind斷點寬度範圍內時才能完美工作</strong>]</p><p>
這是現場預覽</p><p>
這是Github Repo-Code</p>
<p>代碼 -</p>
<pre class="brush:php;toolbar:false;"><body class="flex justify-center items-center h-screen w-full">
<div class="main-container bg-slate-500 min-h-3/6 w-8/12 sm:w-8/12 sm:min-h-3/6 md:w-7/12 md:min-h-2.5/6 lg:w-5/12 lg:min-h-2.5/6 xl:w-4/12 xl:min-h-2.5/6 2xl:w-3.5/12 2xl: min-h-4/6 flex justify-center items-center py-20">
<div class="container bg-slate-200 w-8/12 h-4/6 flex flex-col rounded-lg">
<div class="title py-4 px-5 font-bold">這裡是卡片的標題</div>
<div class="review-date grid grid-cols-2 bg-white w-full h-1/6 items-center p-2 px-4 text-center">
<div class="review flex justify-center items-center text-xs bg-orange-700 text-white font-semibold p-1 sm:w-10/12 sm:py-1 rounded-full uppercase select- none">
UNDER REVIEW
</div>
<div class="date flex justify-end items-center text-xs font-semibold select-none">
May 14, 1988
</div>
</div>
<div class="comment bg-white border-t border-slate-100 w-full">
<p class="commentdata bg-slate-200 text-left text-sm p-3 m-4 rounded-lg select-none">這是關於這位員工的簡短評論。 </p>
</div>
<div class="employeedata px-4 pt-2 pb-4">
<div class="employee uppercase">
<label class="text-xs font-bold text-slate-600">員工</label>
</div>
<div class="employeebar flex mt-2">
<div class="員工標誌 bg-sky-800 text-white text-xs font-bold w-10 h-10 rounded-full flex justify-center items-center>VG</div>
<div class="employee-info flex flex-col ml-4">
Mohammad Mustak
Web 開發人員
</body></pre></p>