如何将页脚粘贴到页面底部:
<footer>
<p>This is a Footer, Copyright © © 2017</p>
</footer>
https://jsfiddle.net/1d9m2frt/2/
footer {
text-align: center;
background-color: #e8491d;
color: #ffffff;
padding: 20px;
margin-top: 20px;
}
我试过 position: fixed;
但它并没有固定在页面底部。
最佳答案
footer {
text-align: center;
background-color: #e8491d;
color: #ffffff;
padding: 20px;
margin-top: 20px;
position:fixed;
width:100%;
bottom:0;
left:0;
right:0;
}
就是这样......
关于html - 如何将页脚粘贴到底部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56257646/