diff --git a/source/css/common/basic.styl b/source/css/common/basic.styl index 3f5d52a..b619a28 100644 --- a/source/css/common/basic.styl +++ b/source/css/common/basic.styl @@ -36,6 +36,9 @@ // html, body // ====================================================================== html, body { + position: relative; + width: 100%; + height: 100%; margin: 0; padding: 0; color: var(--default-text-color); diff --git a/source/css/layout/page.styl b/source/css/layout/page.styl index 8e99334..d4bf0b6 100644 --- a/source/css/layout/page.styl +++ b/source/css/layout/page.styl @@ -1,8 +1,12 @@ $temp-width = hexo-config('style.left_side_width'); -$page-aside-width = $temp-width ? convert($temp-width):260px; +$page-aside-width = $temp-width ? convert($temp-width) : 260px; .page-container { position: relative; + box-sizing: border-box; + width: 100%; + height: auto; + background: var(--background-color); transition-t("padding-left", "0", "0.3", "ease-out"); @@ -85,7 +89,6 @@ $page-aside-width = $temp-width ? convert($temp-width):260px; display: flex; justify-content: center; padding: $component-spacing-value 0; - background: var(--background-color); +keep-tablet() { padding: $component-spacing-value * 0.8 0; diff --git a/source/js/utils.js b/source/js/utils.js index b7794bb..f8b15b1 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -197,7 +197,7 @@ KEEP.initUtils = () => { const innerHeight = window.innerHeight; const pb_dom = document.querySelector('.page-main-content-bottom'); if (allDomHeight < innerHeight) { - pb_dom.style.marginTop = (innerHeight - allDomHeight) + 'px'; + pb_dom.style.marginTop = Math.floor(innerHeight - allDomHeight) + 'px'; } },