From ff4c8460a23895cf9ea843a334a912c2551b80ab Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Mon, 12 Jan 2026 16:30:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=99=90=E5=88=B6=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E9=95=BF=E5=BA=A6=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=20TODO=20=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 #leftbar_catalog 添加 max-height: calc(100vh - 400px) 限制 - 添加滚动条样式,当目录过长时可滚动查看 - 确保目录、TODO 和页面底部保持合理间距 - 添加暗色模式下的滚动条样式 --- style.css | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/style.css b/style.css index 1c662f3..cb7ea6d 100644 --- a/style.css +++ b/style.css @@ -4595,21 +4595,33 @@ html.darkmode .tippy-box[data-theme~="light"] { /*侧栏文章目录*/ #leftbar_catalog { - margin-left: -5px; - width: calc(100% + 0px); - height: auto; + max-height: calc(100vh - 400px); /* 限制最大高度,为 TODO 和底部留出空间 */ + overflow-y: auto; +} +#leftbar_catalog::-webkit-scrollbar { + width: 4px; +} + +#leftbar_catalog::-webkit-scrollbar-track { + background: transparent; +} + +#leftbar_catalog::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, 0.15); + border-radius: 2px; +} + +html.darkmode #leftbar_catalog::-webkit-scrollbar-thumb { + background-color: rgba(255, 255, 255, 0.15); } #leftbar_catalog ul { - padding: 0; - list-style: none; - } #leftbar_catalog .index-item,