zhejiushizhuce 2 vuotta sitten
vanhempi
sitoutus
8961e0c8aa
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  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;
+                  }
               }
            }
         }