<style>
body,html{
height: 100%;
width: 100%;
overflow: auto;
}
.content{
width: 100%;
min-height: 100%; //重要
}
footer{
width: 100%;
height: 400px;
maigin_top= -400px; //高度相关
background: #666;
}
</style>
<div>
<div class="content">页面内容</div>
<footer>底部</footer>
</div>
css使一个按钮保持在页面底部,内容超出屏幕后,保持在内容底部跟随内容一起滚动
最新推荐文章于 2024-05-14 20:57:17 发布