From 7050446b7a562dbc9276a5694c29975c843a69fd Mon Sep 17 00:00:00 2001 From: popup <18690563721@163.com> Date: Sat, 17 Jan 2026 12:29:47 +0800 Subject: [PATCH] =?UTF-8?q?2026-01-17=201.=E4=BC=98=E5=8C=96=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolbox/controller/ToolController.java | 5 + .../static/tools/JiSuanQi/JiSuanQi.html | 363 +++++++----------- 2 files changed, 139 insertions(+), 229 deletions(-) diff --git a/src/main/java/cn/lailab/toolbox/controller/ToolController.java b/src/main/java/cn/lailab/toolbox/controller/ToolController.java index d4129e7..143fda2 100644 --- a/src/main/java/cn/lailab/toolbox/controller/ToolController.java +++ b/src/main/java/cn/lailab/toolbox/controller/ToolController.java @@ -10,4 +10,9 @@ public class ToolController { public String JiSuanQi(){ return "tools/JiSuanQi/JiSuanQi.html"; } + + @RequestMapping("/") + public String index(){ + return "index.html"; + } } diff --git a/src/main/resources/static/tools/JiSuanQi/JiSuanQi.html b/src/main/resources/static/tools/JiSuanQi/JiSuanQi.html index bf15f0b..e84e343 100644 --- a/src/main/resources/static/tools/JiSuanQi/JiSuanQi.html +++ b/src/main/resources/static/tools/JiSuanQi/JiSuanQi.html @@ -9,289 +9,194 @@ margin: 0; padding: 0; box-sizing: border-box; - font-family: "Helvetica Neue", Arial, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } body { - height: 100vh; - display: flex; - justify-content: center; - align-items: center; - background-color: #f5f5f5; - } - - /* 计算器容器 */ - .calculator-container { - width: 100%; - max-width: 400px; - height: 90vh; display: flex; flex-direction: column; - background-color: #000; - border-radius: 20px; - overflow: hidden; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.3); + height: 100vh; + background-color: #ffffff; + padding: 20px; } /* 显示区域 */ .display { flex: 1; display: flex; - flex-direction: column; justify-content: flex-end; align-items: flex-end; - padding: 40px 30px; - color: #fff; - } - - .input-text { - font-size: 24px; - margin-bottom: 10px; - opacity: 0.8; - } - - .result-text { - font-size: 40px; - font-weight: 300; + padding: 20px 10px; + font-size: 8rem; + font-weight: 200; + color: #000000; + overflow: hidden; } /* 按钮区域 */ .buttons { - flex: 2; - display: flex; - flex-direction: column; - padding: 10px; + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 15px; } - .btn-row { - display: flex; - flex: 1; - } - - .btn { - flex: 1; - margin: 5px; - border-radius: 50%; - display: flex; - justify-content: center; - align-items: center; - font-size: 20px; + /* 按钮基础样式 */ + button { + height: 80px; border: none; - outline: none; + border-radius: 50px; /* 圆角按钮 */ + font-size: 1.8rem; cursor: pointer; - transition: opacity 0.2s; + transition: background-color 0.2s ease; } - .btn:hover { - opacity: 0.9; + /* 功能按钮(AC、+/-、%) */ + .func-btn { + background-color: #e6f7ff; + color: #1890ff; } - /* 按钮样式 */ - .btn-gray { - background-color: #a5a5a5; - color: #000; + .func-btn:active { + background-color: #bae7ff; } - .btn-num { - background-color: #333333; - color: #fff; + /* 数字按钮 */ + .num-btn { + background-color: #f5f5f5; + color: #000000; } - .btn-orange { - background-color: #ff9f0a; - color: #fff; + .num-btn:active { + background-color: #e0e0e0; } - /* 0号按钮特殊样式 */ - .zero { - border-radius: 50px; - flex: 2; + /* 运算符按钮(天蓝色主题) */ + .op-btn { + background-color: #1890ff; + color: #ffffff; } - /* 响应式适配 */ - @media (max-width: 400px) { - .calculator-container { - height: 100vh; - border-radius: 0; - } + .op-btn:active { + background-color: #096dd9; + } - .display { - padding: 30px 20px; - } - - .result-text { - font-size: 36px; - } + /* 0号按钮占两列 */ + #zero { + grid-column: span 2; } -
- -
-
-
0
-
+
0
+
+ + + + - -
- -
- - - - -
+ + + + - -
- - - - -
+ + + + - -
- - - - -
+ + + + - -
- - - - -
- - -
- - - -
-
+ + +