Skip to content

Commit cb320a8

Browse files
fix: Tab 内容显示 + 进度条移至底部
1 parent f2968eb commit cb320a8

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

docs/index.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,16 @@
5151
overflow-x: hidden;
5252
}
5353

54-
/* Scroll progress bar */
54+
/* Scroll progress - 底部阅读进度,避免被误认为加载条 */
5555
#scroll-progress {
5656
position: fixed;
57-
top: 0; left: 0;
57+
bottom: 0; left: 0;
58+
height: 2px;
5859
width: 0%;
59-
height: 3px;
60-
background: linear-gradient(90deg, #58a6ff, #a371f7);
60+
background: linear-gradient(90deg, var(--border) 0%, var(--text-muted) 100%);
6161
z-index: 9999;
62-
transition: width 0.08s ease-out;
62+
transition: width 0.1s ease-out;
63+
opacity: 0.7;
6364
}
6465

6566
/* Lang switcher - no glass bar */
@@ -414,9 +415,11 @@
414415
.tab-content {
415416
display: none;
416417
opacity: 0;
417-
transform: translateY(10px);
418418
}
419-
.tab-content.active { display: block; }
419+
.tab-content.active {
420+
display: block;
421+
opacity: 1;
422+
}
420423

421424
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
422425
.feature-chip {
@@ -775,8 +778,8 @@ <h2 class="section-title animate-el"><span data-i18n="donateTitle">☕ 支持开
775778
// Scroll progress
776779
const prog = document.getElementById('scroll-progress');
777780
window.addEventListener('scroll', () => {
778-
const sc = window.scrollY, sh = document.documentElement.scrollHeight - window.innerHeight;
779-
prog.style.width = sh > 0 ? (sc / sh * 100) + '%' : '0%';
781+
const sc = window.scrollY, sh = Math.max(1, document.documentElement.scrollHeight - window.innerHeight);
782+
prog.style.width = (sc / sh * 100) + '%';
780783
});
781784

782785
// Quick nav visibility

0 commit comments

Comments
 (0)