我想为我的网站制作页脚,并且我希望它被修复(总是在底部)。它工作正常,看起来不错,但是当内容已满时,它没有显示我给它的 margin-top。请帮忙,我需要一种方法来提供固定的 div - margin-top ...谢谢。
代码:
<div style="width: 100%; height: 100px; margin-bottom: 50px; background: red;">
</div>
<div style="width: 100%; text-align: center;">
Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />
</div>
<div style="width: 100%; height: 50px; margin-top: 50px; background: blue; position: fixed; bottom: 0;">
</div>