html/css让底部在页面最下面

html {
position: relative;
min-height: 100%;
}
body {
  <!-- 你底部div的高度 -->
margin-bottom: 100px;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
<!-- 你底部div的高度 -->
height: 100px;
}
posted @ 2023-12-24 12:42  帅哥才  阅读(22)  评论(0编辑  收藏  举报