소스 검색

no message

zhejiushizhuce 2 년 전
부모
커밋
8961e0c8aa
1개의 변경된 파일과 6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/layout/Navbar/index.jsx

+ 6 - 0
src/layout/Navbar/index.jsx

@@ -271,6 +271,12 @@ const PageHeader = () => {
            if (headerRoom){
               if (!barRef.showHeader){
                   offset=headerRoom.clientHeight;
+                  const hstyle = window.getComputedStyle(headerRoom);
+                  if (hstyle!=null){
+                      let paddingBottom=hstyle.paddingBottom;
+                      paddingBottom=Number(paddingBottom.replace("px",""));
+                      offset=offset-paddingBottom;
+                  }
               }
            }
         }