body相对定位,给这个div 绝对定位到底部
<body>
<style>
body{position: relative;height: 1000px;}
.footer{position: absolute;bottom: 0;left: 0;height: 20px;width: 100%;background-color: yellow;}
</style>
<div class="header"></div>
<div class="main"></div>
<div class="footer"></div>
</body>
最后
以上就是伶俐保温杯最近收集整理的关于CSS如何把DIV永远置于页面的底部的全部内容,更多相关CSS如何把DIV永远置于页面内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复