添加返回顶部按钮

This commit is contained in:
MasonLiu committed 2026-06-02 23:29:42 +08:00
1 parent c4b1f8fd1b
commit 9949072ae0
7 files changed
+233

No files matched your search

+52
View File
@@ -770,4 +770,56 @@ body.dark-mode .beian-divider {
padding: 15px 10px;
font-size: 0.8rem;
}
}
/* 返回顶部按钮 */
.back-to-top {
position: fixed;
bottom: 30px;
right: 30px;
width: 45px;
height: 45px;
border-radius: 50%;
background: var(--accent-color, #3498db);
color: white;
border: none;
font-size: 1.5em;
cursor: pointer;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}
.back-to-top.show {
opacity: 1;
visibility: visible;
}
.back-to-top:hover {
transform: translateY(-3px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
background: #2980b9;
}
body.dark-mode .back-to-top {
background: #63b3ed;
}
body.dark-mode .back-to-top:hover {
background: #4299e1;
}
@media (max-width: 768px) {
.back-to-top {
bottom: 20px;
right: 20px;
width: 40px;
height: 40px;
font-size: 1.3em;
}
}
+47
View File
@@ -557,4 +557,51 @@ body.dark-mode .download-btn:hover {
::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
/* 返回顶部按钮 */
.back-to-top {
position: fixed;
bottom: 30px;
right: 30px;
width: 45px;
height: 45px;
border-radius: 50%;
background: var(--accent-color);
color: white;
border: none;
font-size: 1.5em;
cursor: pointer;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}
.back-to-top.show {
opacity: 1;
visibility: visible;
}
.back-to-top:hover {
transform: translateY(-3px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
body.dark-mode .back-to-top {
background: #63b3ed;
}
@media (max-width: 768px) {
.back-to-top {
bottom: 20px;
right: 20px;
width: 40px;
height: 40px;
font-size: 1.3em;
}
}
+47
View File
@@ -522,4 +522,51 @@ body.dark-mode .download-btn:hover {
::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
/* 返回顶部按钮 */
.back-to-top {
position: fixed;
bottom: 30px;
right: 30px;
width: 45px;
height: 45px;
border-radius: 50%;
background: var(--accent-color);
color: white;
border: none;
font-size: 1.5em;
cursor: pointer;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}
.back-to-top.show {
opacity: 1;
visibility: visible;
}
.back-to-top:hover {
transform: translateY(-3px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
body.dark-mode .back-to-top {
background: #63b3ed;
}
@media (max-width: 768px) {
.back-to-top {
bottom: 20px;
right: 20px;
width: 40px;
height: 40px;
font-size: 1.3em;
}
}