【发布时间】:2021-01-19 21:12:02
【问题描述】:
我目前正在尝试将页脚元素的内容保持在内部并居中。然而,他们并没有呆在里面。我还希望它能够响应移动设备,因此无论页脚大小如何,它们都会留在页脚内。
另外,有没有更好的方法可以实现始终位于中间内容下方的移动响应页脚?
这是我当前的代码:
/* Footer Styling */
footer{
width:100vw;
height: 5%;
background-color:#FFF6E3;
position:absolute;
bottom:0;
text-align:center;
}
footer h3 {
margin-top: 2%;
font-family: Helvetica;
font-style: normal;
font-weight: bold;
font-size: 31px;
line-height: 36px;
color: #BB7720;
}
footer p, a {
font-family: Baskerville;
font-style: italic;
font-weight: normal;
font-size: 31px;
text-align: right;
letter-spacing: 0.07em;
text-align:center;
color: #946E29;
}
<footer>
<h3>CONNECT WITH BUN BUN</h3>
<p>Contact us at <a href="#">bunbun@gmail.com</a></p>
</footer>
【问题讨论】:
标签: html css containers footer children