所以我试图添加一个页脚,但它的末尾有2行的不必要空间,页面的背景色也有。我该怎么解决?
footer {
text-align: center;
background-color: orange;
margin-bottom: -200px;
height: 5em;
}
.contact {
padding: 0px;
}
.contact a {
color: black;
margin-top: 30px;
}
<footer>
<div class="container contact">
<div class="row">
<div class="col-md-12 align self-center">
<p> Made with ❤ by Team PitchTeen </p>
<a class="contact-link" href="mailto:teampitchteen@gmail.com">teampitchteen@gmail.com</a>
</div>
</div>
</div>
</footer>
如果带有"端部2行的不必要空间";,你的意思是";填充";在链接的底部,您可以从footer
CSS属性中删除height
,如下所示:
footer {
text-align: center;
background-color: orange;
margin-bottom: -200px;
/*height: 5em;*/
}
/* useless too now
.contact {
padding: 0px;
}*/
.contact a {
color: black;
margin-top: 30px;
}
<footer>
<div class="container contact">
<div class="row">
<div class="col-md-12 align self-center">
<p> Made with ❤ by Team PitchTeen </p>
<a class="contact-link" href="mailto:teampitchteen@gmail.com">teampitchteen@gmail.com</a>
</div>
</div>
</div>
</footer>