Skip to content

Commit

Permalink
修复TOC元素点击被hearder遮挡的问题 fix #154
Browse files Browse the repository at this point in the history
  • Loading branch information
anzhiyu-c committed Nov 30, 2023
1 parent c9f04ab commit 206edf5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion source/css/_third-party/normalize.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
html {
line-height: 1.15;
-webkit-text-size-adjust: 100%;
scroll-padding-top: 60px;
}

/* 滚动条轨道样式 */
Expand Down
2 changes: 1 addition & 1 deletion source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ document.addEventListener("DOMContentLoaded", function () {

e.preventDefault();
anzhiyu.scrollToDest(
anzhiyu.getEleTop(document.getElementById(decodeURI(target.getAttribute("href")).replace("#", ""))),
anzhiyu.getEleTop(document.getElementById(decodeURI(target.getAttribute("href")).replace("#", ""))) - 60,
300
);
if (window.innerWidth < 900) {
Expand Down

0 comments on commit 206edf5

Please sign in to comment.