页面在这里
我正在使用粘性页脚,除了我的投资组合页面外,它在任何地方都可以正常工作。库的位置相对,并且从其父div 溢出。页脚粘在父项的底部,而不是页面。
帮助?最好是以一种我不必重写所有代码的方式?
请尝试这个,希望对您有所帮助。
html, body {
height: 100%;
}
header {
background: #fff;
position: relative;
z-index: 100;
}
.content2 {
clear: both;
margin: 0 auto;
padding: 0;
text-align: center;
width: 70%;
}
.gallery {
display: table;
height: 100%;
margin-left: auto;
margin-right: auto;
margin-top: auto;
position: relative;
width: 100%;
}
#footer-block {
bottom: 0;
position: fixed;
width: 100%;
}
谢谢
通过将正文和 html 编码为 110% 高度、页脚包装器设置为 100% 高度以及添加高度为 100% 的页面包装器来修复它。