html - 我的页脚不会停留在固定位置,内容和页脚之间有空间
问题描述
我在内容和页脚之间有很大的空间差距......我试着玩弄position:fixed
,margin:0
但padding:0
似乎没有任何效果。附上我的代码以供参考。
任何帮助将非常感激。
<footer>
<div class="social-media">
<p>MardiDrama Club</p>
<a class="facebook" href="#">
<img src="assets/images/iconfinder_square-facebook_317727.png">
</a>
<a class="instagram" href="#">
<img src="assets/images/iconfinder_Instagram_381384.png">
</a>
<a class="twitter" href="#">
<img src="assets/images/iconfinder_twitter_410515.png">
</a>
</div>
</footer>
footer {
position: fixed;
margin-top: 0;
margin-bottom: 0;
padding: 0;
width: 100%;
background-color: #4FAFF9;
text-align: center;
color: white;
}
.social-media{
margin: 310px auto;
justify-content: space-around;
display: flex;
max-width: 700px;
}
.social-media a{
text-decoration: none;
color: #4FAFF9;
width: 60px;
height: 80px;
transition: 0.4s all;
line-height: 58px;
cursor: pointer;
background: #96C7ED
border-radius: 58%;
}
.social-media p{
text-align: center;
white-space: nowrap;
}
.social-media a:hover{
transform: scale(1,1.5);
}
解决方案
推荐阅读
- javascript - 如何在运行另一个函数之前等待 jQuery 切换完成?
- javascript - Javascript 的 CSS Flex 问题,for 循环中的 element.style.display = "none"
- dart - 飞镖中的最大/最小 int/double 值是否有常数?
- image-processing - Keras 和 Tensorflow GPU 在大图像数据上内存不足
- php - WordPress - 如何获取帖子内容和标题
- java - Java Freemarker 模板引擎只能访问自定义注释方法?
- algorithm - ADT(抽象数据类型)和容器有什么区别?
- placeholder - 仅将占位符中的星号更改为红色
- php - 如何将动态值从一个 php 页面“转移”到另一个 php 页面?
- r - barp() 的 Y 轴问题