From 59229eb1b58079c990bf52a4989bebc99c14ae46 Mon Sep 17 00:00:00 2001 From: ZhuangYumin Date: Mon, 18 Dec 2023 06:53:56 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86css=E7=9A=84?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/Web/basic.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/Web/basic.css b/frontend/Web/basic.css index 1fed3a5..2605877 100644 --- a/frontend/Web/basic.css +++ b/frontend/Web/basic.css @@ -2,7 +2,7 @@ body { margin: 0; font-family: Arial, sans-serif; min-height: 100vh; /* 设置 body 的最小高度为视口的高度 */ - display: flex; + /*display: flex;*/ flex-direction: column; } @@ -100,7 +100,8 @@ nav { width: 200px; background-color: #f4f4f4; padding: 20px; - min-height: calc(100vh - 70px); /* 70px 是 header 的高度,设置 nav 的最小高度 */ + --header-height: 140px; /* 默认高度,可以根据实际情况调整 */ + min-height: calc(100vh - var(--header-height)); } nav a {