【发布时间】:2021-07-21 19:12:55
【问题描述】:
- 它粘在首页底部,但不在其他页面上。
- 我正在使用所有页面上的部分,主页上总共有 5 个部分,其他页面上各 1 个。
- 我是编码初学者,所以请帮我解决这个问题。
- 点击here查看有问题的视频
.copyright p{
margin: 0;
font-size: 15px;
}
.copyright{
padding: 100px;
color: white;
}
.footlogo{
padding: 20px;
width: 300px;
cursor: pointer;
align-items: center;
}
.navfoot{
padding: 20px;
display: flex;
position: relative;
justify-content: center;
}
.foot-btn{
display: inline;
padding: 10px;
color: white;
text-underline-position: 3px;
transition: 0.2s;
}
.foot-btn:hover{
color: #a200ff;
transform: translateY(-5px);
transition: 0.2s;
}
footer{
position: relative;
bottom: 0;
width: 100%;
color: white;
text-align: center;
background: #171724;
max-height: 10cm;
align-content: center;
overflow: hidden;
}
.call{
display: inline;
justify-content: space-around;
}
<footer>
<div class="call">
<div class="copyright">
<img src="Images/Banner.png" class="footlogo">
<p><span>©</span> Copyright 2021 proudly created by Darshan Daiv</p>
<div class="navfoot">
<a href="Website.html" class="foot-btn">Home</a>
<a href="Alphamesh.html" class="foot-btn">Alphamesh</a>
<a href="Aboutme.html" class="foot-btn">About Me</a>
<a href="Portfolio.html" class="foot-btn">Portfolio</a>
<a href="Contact.html" class="foot-btn">Contact</a>
</div>
</div>
</div>
</footer>
【问题讨论】:
-
请分享更多代码。您可以将标题和正文添加到 sn-p(或至少每个示例)。
-
html{ position: relative; min-height: 100%; scroll-behavior: smooth; cursor: none; height: 100%; } .body{ height: 100%; margin: 8%; }