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

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

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

View File

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