<分区>
我在 next.js 中对页面进行样式化时遇到问题。我想要全高页面。
因此,我在 body 和 html 标签中设置了 height 属性,这没问题,我有 body 和 html 标签的全高(在开发工具中证明)但是虽然我将 #__next 高度设置为 100%,但我无法实现它的全高。 如果我应用其他测量值,如 px 或 vh,它会受到影响。
布局.css
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
}