修改切换按钮样式并添加基础动效

This commit is contained in:
张梦南 2025-04-22 20:37:03 +08:00
parent 677f6270fe
commit 3f3abdcd66
3 changed files with 19 additions and 10 deletions

View File

@ -29,6 +29,17 @@
transform: translateX(-50%); transform: translateX(-50%);
bottom: 120px; bottom: 120px;
z-index: 1; z-index: 1;
} }
.swbutton {
background-color: rgba(200, 200, 200, 0.1);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
transition: background-color 1s ease, transform 0.5s ease;
}
.swbutton:hover {
background-color: rgba(200, 200, 200, 0.3);
transform: scale(1.02); /* 可选的小缩放效果 */
}
} }

View File

@ -37,11 +37,9 @@
<!-- 右侧内容 --> <!-- 右侧内容 -->
<div class="right-panel" id="rightPanel"> <div class="right-panel" id="rightPanel">
<div class="tool-card"> <div class="datetime">
<div class="datetime"> <div id="timeDisplay" class="time">--:--:--</div>
<div id="timeDisplay" class="time">--:--:--</div> <div id="dateDisplay" class="date">加载中...</div>
<div id="dateDisplay" class="date">加载中...</div>
</div>
</div> </div>
<div class="future-content"> <div class="future-content">
<p>此处预留未来内容</p> <p>此处预留未来内容</p>
@ -51,7 +49,7 @@
<!-- 移动端切换按钮 --> <!-- 移动端切换按钮 -->
<div class="switch_button"> <div class="switch_button">
<button onclick="hideLeftPanel()">显示左侧</button> <button onclick="switchPanel()" class="swbutton">Switch</button>
</div> </div>
<!-- DeepSeek 聊天输入 --> <!-- DeepSeek 聊天输入 -->

View File

@ -1,11 +1,11 @@
const Panel_left = document.getElementById('leftPanel'); const Panel_left = document.getElementById('leftPanel');
const Panel_right = document.getElementById('rightPanel'); const Panel_right = document.getElementById('rightPanel');
function hideLeftPanel() { function switchPanel() {
if (Panel_right.style.display === 'none' || Panel_right.style.display === '') { if (Panel_right.style.display === 'none' || Panel_right.style.display === '') {
Panel_left.style.display = 'none'; Panel_left.style.display = 'none';
Panel_right.style.display = 'flex'; Panel_right.style.display = 'flex';
} }
else { else {
Panel_left.style.display = 'flex'; Panel_left.style.display = 'flex';
Panel_right.style.display = 'none'; Panel_right.style.display = 'none';