From cd8672911547141f0fa41c177bd0d6f26458a412 Mon Sep 17 00:00:00 2001 From: yourname Date: Fri, 27 Jun 2025 04:30:04 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/admin/layouts/MainLayout.tsx | 24 +++++------ src/style.css | 54 +++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/src/client/admin/layouts/MainLayout.tsx b/src/client/admin/layouts/MainLayout.tsx index a37a2b6..247fb89 100644 --- a/src/client/admin/layouts/MainLayout.tsx +++ b/src/client/admin/layouts/MainLayout.tsx @@ -108,12 +108,13 @@ export const MainLayout = () => { return ( - { top: 0, bottom: 0, zIndex: 100, + transition: 'all 0.2s ease', + boxShadow: '2px 0 8px 0 rgba(29, 35, 41, 0.05)', }} >
@@ -156,12 +159,9 @@ export const MainLayout = () => { -
+
- -
+ +
diff --git a/src/style.css b/src/style.css index d4b5078..0ca901e 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,55 @@ @import 'tailwindcss'; + +/* 全局滚动条样式 */ +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 3px; +} + +::-webkit-scrollbar-thumb { + background: #c1c1c1; + border-radius: 3px; +} + +::-webkit-scrollbar-thumb:hover { + background: #a8a8a8; +} + +/* 响应式断点 */ +@media (max-width: 768px) { + .custom-sider { + width: 100% !important; + max-width: 100% !important; + } + + .site-layout-content { + padding: 1rem !important; + } +} + +/* 全局过渡效果 */ +.transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +/* 内容区域阴影优化 */ +.shadow-sm { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); +} + +/* 按钮悬停效果 */ +.ant-btn:hover { + transform: translateY(-1px); +} + +/* 卡片样式优化 */ +.ant-card { + border-radius: 8px; +} \ No newline at end of file