From 4746844d861ef1e2ae71ce6628fb9e781cca3ebd Mon Sep 17 00:00:00 2001 From: Kisechan Date: Thu, 5 Jun 2025 15:54:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E6=97=A0=E6=B3=95=E5=9B=BA=E5=AE=9A=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/global.css | 1 + src/components/NavBar.vue | 7 +++++++ src/style.css | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/assets/styles/global.css b/src/assets/styles/global.css index 019eaf2..cef9b91 100644 --- a/src/assets/styles/global.css +++ b/src/assets/styles/global.css @@ -47,6 +47,7 @@ body { font-family: 'LXGW WenKai', sans-serif; margin: 0; padding: 0; + padding-top: 60px; } /* 设置代码或等宽文本的字体 */ diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 8b7c547..801c245 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -131,6 +131,13 @@ initializeDarkMode(); align-items: center; justify-content: space-between; padding: 0 20px; + position: fixed; + top: 0; + left: 0; + width: 100%; + background-color: var(--el-bg-color, #ffffff); /* 使用 Element Plus 的背景色变量,或者您自定义的颜色 */ + z-index: 1000; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); } .menu-items { diff --git a/src/style.css b/src/style.css index a1fb006..6d41124 100644 --- a/src/style.css +++ b/src/style.css @@ -33,10 +33,11 @@ a:hover { body { margin: 0; - display: flex; - place-items: center; + /* display: flex; */ + /* place-items: center; */ min-width: 320px; min-height: 100vh; + padding-top: 60px; } h1 {