为什么我的页脚周围有一个空盒子?

问题描述 投票:1回答:1

我正在尝试在页面底部放置页脚但是底部总是有空白]

https://codepen.io/ryboh1/pen/jOPVzpv

我的CSS

body{
  min-height:100vh;
  position:relative;
}

.page-wrap{
  padding-bottom:50px;
}


footer{
  position:absolute;
  background-color:red;
  bottom:0;
  width:100%;
  height:50px;
}

我不确定是什么创造出来的。

html css footer
1个回答
0
投票

添加

html{
    height: 100%;
}

至少应该通过查看代码笔来解决该问题。

© www.soinside.com 2019 - 2024. All rights reserved.