我是 CSS 新手,查了很多方法,但无法让页脚与底部对齐。有什么帮助吗?谢谢。
.footer {
position: bottom;
bottom: -10px;
height: 30px;
width: 100%;
background-color: #171717;
color: white;
}
最佳答案
将位置更改为固定。
.footer {
position:fixed;
bottom:0px;
height:30px;
width:100%;
background-color:#171717;
color:white;
}
关于html - 如何使页脚对齐到最底部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12208977/