【发布时间】:2018-11-18 18:45:44
【问题描述】:
我不明白为什么我的页脚略高于网页底部而不是直接位于底部
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>
【问题讨论】:
-
你能用
position:fixed代替relative吗? -
可能是因为您的 (h6) 标签,请尝试使用其他标签,例如 (p, div or span)
-
添加您的完整代码
-
您需要删除边距。给
margin: 0。