html - 为什么我的页脚不在底部
问题描述
我不明白为什么我的页脚略高于网页底部而不是直接位于底部
h6 {
font-family: Neue Haas Grotesk, sans-serif;
font-weight: 300;
font-size: 1.4vw;
color: white;
position: relative;
display: block;
}
.footer {
position: relative;
display: inline;
bottom: 0;
width: 100%;
height: 100%;
margin-bottom: 0;
padding: 0;
}
<div class="footer">
<h6>© Alex Burger. All rights reserved<br>Further information can be requested through email.</h6>
</div>
解决方案
<h6>
标签具有原生边距。因此,您的问题将通过以下方式解决:
.footer h6 {
margin-bottom: 10px;
}
请注意,设置margin: 0px
没有您期望的结果,这只能通过更改文档的其他部分来解决。