html {
position: relative;
min-height: 100%;
}
body {
<!-- 你底部div的高度 -->
margin-bottom: 100px;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
<!-- 你底部div的高度 -->
height: 100px;
}
html/css让底部在页面最下面
发布时间 2023-12-24 12:47:03作者: 帅哥才
html {
position: relative;
min-height: 100%;
}
body {
<!-- 你底部div的高度 -->
margin-bottom: 100px;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
<!-- 你底部div的高度 -->
height: 100px;
}