【发布时间】:2020-04-17 22:13:33
【问题描述】:
我相信我的背景 img 在它和我的 flexbox 粘性页脚之间创建了一个空白区域。我尝试了很多方法,但到目前为止它们只会产生不同的问题......有人可以帮忙吗?我创建了一个占位符图像,它的大小与我的原始背景 img 相同,以便为您重现问题!谢谢!
CSS:
.masthead {
height: 100vh;
min-height: 100%;
background:; /* ie 6 cheat */
background-image: url('http://via.placeholder.com/3024x4032?Placeholder%27');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
/* Sticky Footer Classes */
body
{
display: flex;
flex-direction: column;
}
html, body
{
height: 100%;
}
#page-content {
flex: 1 0 auto;
}
#sticky-footer {
flex-shrink: 0;
}
【问题讨论】:
标签: html bootstrap-4 flexbox background-image sticky-footer