如何使用CSS从页脚中删除多余的填充



我想将页脚的填充设置为0,这样页脚的内容(社交媒体图标(就占据了整个页脚,而没有多余的空间。我将填充设置为0,但它仍然会给我一个填充。使用引导程序btw.

这是我的html:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet"href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"crossorigin="anonymous" />
<footer class="footer mt-auto py-3 fixed-bottom"> 
<div class="containerfoot"style="background-color:darkcyan">
<a href="https://www.linkedin.com/in/aiya-siddig/"><i class="fab fa-linkedin linkedln" style="font-size:36px;color:white;margin-right: 10px;"></i></a>
<a href="https://github.com/aiyasiddig"><i class="fab fa-github github" style="font-size:36px;color:white;margin-right: 10px;"></i></a>
<a href="mailto:example@outlook.com"><i class="fas fa-envelope mail" style="font-size:36px;color:white"></i></a>
</div>
</footer>  

这是我的css:

.footer{
background-color:darkcyan;
color: cornsilk;
width: max-content;
text-align:center;
position: fixed;
margin: auto;
bottom: 0;
min-width: fit-content; 
padding: 0;

}
i {
margin-left: 50px;
margin-right: 50px;
padding: 10px;
border-style: solid;
border-color: white;
border-radius: 100%;
}

删除类py-3,然后设置为进入

最新更新