<分区>
<分区>
我的主要区域中间有页脚问题。
默认情况下是这样的:
<div style={{width: '100%', height: '100%', display: 'flex', flexFlow: 'column nowrap'}}>
<div id="appbar"></div>
<div id="main" style={{ margin: '4.5rem 0 0 0', width: '100%', height: '100%', boxSizing: 'border-box' }}>
<Router>
<Home />
</Router>
</div>
<div id="footer"></div>
</div>
主 div 设置为预期的 100% 会发生什么,但随后它会出现一些深度嵌套的子项(Home 组件),其高度超过原始高度的 100%。在那之后我的页脚恰好卡在了 main 的中间:
我怎样才能克服这个问题?
最佳答案
尝试给出一个底部为 0 的绝对位置,并为您的内容提供填充底部
关于html - 内部 div 的高度大于容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56223428/