From d2b4541bcf9033aee3a28c2e4e23ba951a5d49a2 Mon Sep 17 00:00:00 2001 From: alpacanosleep <204532647@qq.com> Date: Sat, 7 Dec 2024 17:52:36 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=98=E6=88=90=E4=BE=A7=E8=BE=B9=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/student.jsp | 145 ++++++++++-------- target/classes/.gitignore | 4 +- target/classes/main/webapp/student.jsp | 145 ++++++++++-------- .../META-INF/maven/New/New/pom.properties | 4 +- 4 files changed, 162 insertions(+), 136 deletions(-) diff --git a/src/main/webapp/student.jsp b/src/main/webapp/student.jsp index c2bb48e..d03c025 100644 --- a/src/main/webapp/student.jsp +++ b/src/main/webapp/student.jsp @@ -7,17 +7,16 @@ /* 全局样式 */ body { font-family: Arial, sans-serif; - background-color: #f4f9fc; /* 淡蓝色背景 */ + background-color: #f4f9fc; margin: 0; padding: 0; display: flex; - flex-direction: column; - align-items: center; + height: 100vh; box-sizing: border-box; } - /* 导航栏样式 */ - .navbar { + /* 导航栏样式 (上方) */ + .student-top-nav { width: 100%; padding: 10px; background-color: #0066cc; /* 蓝色背景 */ @@ -31,12 +30,12 @@ z-index: 1000; } - .navbar h2 { + .student-top-nav h2 { margin: 0; font-size: 1.5em; } - .navbar a { + .student-top-nav a { color: white; text-decoration: none; padding: 8px 16px; @@ -45,90 +44,104 @@ transition: background-color 0.3s; } - .navbar a:hover { + .student-top-nav a:hover { background-color: #004d99; /* 蓝色悬停效果 */ } - /* 页面主体部分 */ - .main-content { - margin-top: 60px; /* 给导航栏留出空间 */ - padding: 20px; - display: flex; - flex-wrap: wrap; - justify-content: space-around; /* 使框自动填充 */ - width: 100%; - box-sizing: border-box; - gap: 20px; /* 添加间距 */ - } - - /* 每个功能链接的box */ - .feature-box { + /* 左侧导航栏样式 */ + .student-left-nav { + width: 220px; background-color: #0066cc; /* 蓝色背景 */ color: white; - margin: 10px; - padding: 20px; - border-radius: 8px; - width: 260px; /* 设置宽度 */ - height: 260px; /* 将高度调整为原来的一半 */ + padding: 20px 10px; + box-sizing: border-box; display: flex; - justify-content: center; - align-items: center; - text-align: center; - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */ - transition: transform 0.3s ease, box-shadow 0.3s ease; + flex-direction: column; + position: fixed; + top: 60px; /* 给上方导航栏留出空间 */ + left: 0; + height: calc(100vh - 60px); /* 留出上方导航栏的空间 */ + overflow-y: auto; } - .feature-box:hover { - transform: translateY(-5px); /* 鼠标悬停时的效果 */ - box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* 更强的阴影 */ + .student-left-nav h2 { + margin: 0 0 20px; + font-size: 1.5em; + text-align: center; } - .feature-box a { + .student-left-nav a { color: white; text-decoration: none; - font-size: 1.1em; - transition: color 0.3s; + padding: 10px 15px; + margin-bottom: 10px; + font-size: 1em; + border-radius: 5px; + transition: background-color 0.3s; + } + + .student-left-nav a:hover { + background-color: #004d99; /* 蓝色悬停效果 */ + } + + /* 右侧内容区域样式 */ + .student-main-content { + margin-left: 240px; /* 给左侧导航留出空间 */ + padding: 20px; + width: calc(100% - 240px); + box-sizing: border-box; + overflow-y: auto; + height: calc(100vh - 60px); /* 留出上方导航栏的空间 */ + background-color: #f4f9fc; + margin-top: 60px; /* 防止内容被上方导航栏遮挡 */ } - .feature-box a:hover { - color: #e0e0e0; /* 链接悬停颜色 */ + /* 默认页面内容 */ + .default-content { + text-align: center; + margin-top: 20px; } - -