我正试图在主页中获得一个div,以填充它可以占据的100%高度。我尝试过不同的解决方案,比如应用高度:100%应用于身体或所有div等,但都不起作用。
如有解决方案,不胜感激。
提前谢谢。
[EDIT]
我将height:100%应用于#__docusaurus,这解决了高度问题,但现在它做到了:https://i.stack.imgur.com/TohTP.png
这是主页中的一个填充项。
导航到./src/components/
并打开HomepageFeatures.js
。
在该文件中,查找.features {
并删除行padding: 2rem 0;
。
已解决。我没有使用高度100%,但我应用了以下css:
.parent { // For docusaurus/me its .main-wrapper
display: flex;
flex-direction: column;
}
.child { // For me its the feature section that can be seen in the images posted
flex-grow: 1
}
我还删除了高度:100%来自孩子和家长