我在 next.js 中样式化页面时遇到问题。我想要全高页面。
因此,我在 body 和 html 标签中设置了 height 属性,没关系,我有 body 和 html 标签的全高(在开发工具中证明),但是虽然我将 #__next height 设置为 100%,但我无法实现全高它。如果我应用其他测量值,如 px 或 vh,它会受到影响。
布局文件
html {
height: 100%;
font-size: 16px;
}
body {
min-height: 100%;
font-family: @text-font-family;
direction: rtl !important;
text-align: start !important;
}
#__next {
height: 100%; // or min-height
}
Run Code Online (Sandbox Code Playgroud)