【发布时间】:2019-06-03 12:05:26
【问题描述】:
我正在开发一个单页,并且我有一个共享的页脚布局,我想始终将其保留在页面底部,甚至我想知道是否有办法不以某种方式将其可视化即使它已经在 app.component.html 中声明了
我已经在 scss 上测试了所有可能的页脚位置
app.component.html
<div class="grid-container">
<main [@fadeAnimation]="o.isActivated ? o.activatedRoute : ''">
<router-outlet #o="outlet"></router-outlet>
</main>
<rb-footer class="footer"></rb-footer>
</div>
<rb-modal></rb-modal>
app.component.scss
:host {
.grid-container {
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-columns: auto;
height: 100vh;
}
.footer {
position: initia
width:100%;
height:40px;
}
}
【问题讨论】:
-
尝试将
grid-container的高度更改为height: calc(100vh - 40px)并设置max-height: calc(100vh - 40px)您可能需要将overflow-y: auto添加到容器中。
标签: css angular scss-mixins