diff --git a/index.html b/index.html index 051dabc..395a26b 100644 --- a/index.html +++ b/index.html @@ -1,270 +1,220 @@ - + - - - ZSCGR Star 导航 - - + /* 响应式 */ + @media screen and (max-width: 768px) { + .left-bar { left: -248px; } + .left-bar.active { left: 0; } + .main { margin-left: 0; } + #mobile-menu-btn { display: block; } + #search { width: 100%; } + } + - -
-

- ZSCGR github Star 导航 -

- -
-
-
- -
-
- -
-
-
-
- - + + // 5. 辅助功能:移动端侧边栏切换 + function toggleSidebar() { + document.getElementById('sidebar').classList.toggle('active'); + } + + // 6. 辅助功能:回到顶部显示 + window.addEventListener('scroll', () => { + const btn = document.getElementById('fixedBar'); + btn.style.display = window.scrollY > 300 ? 'flex' : 'none'; + }); + +