【发布时间】:2019-04-24 17:47:57
【问题描述】:
我有一个 div 和一个页脚。我的 div 仅用于显示错误消息。当 div 收到错误列表时,它会覆盖页脚。
我尝试将页脚用作“相对”,但页脚位于屏幕中间,我需要它始终位于底部。
有谁知道如何让页脚保持响应或其他解决方案,使其不会在屏幕上丢失?
.box-errors {
overflow: auto;
min-height: 100px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: auto;
line-height: 58px;
background-color: #000;
color: #ffffffc4;
font-size: 12px;
text-align: center;
}
Obs.:页脚为黑色,div 为红色。
【问题讨论】:
-
你能在小提琴上创建一个布局吗?解决问题很容易
-
欢迎来到 SO。请花点时间访问SO Asking Help,同时必须阅读How to create a Minimal, Complete, and Verifiable example。是的,这里你提供了代码但唯一的 CSS,还请提供相关的 HTML 部分。
-
我从不拉小提琴
标签: html css angular responsive