gpt4 book ai didi

javascript - 如何修复屏幕底部的页脚?

转载 作者:行者123 更新时间:2023-11-30 11:43:22 25 4
gpt4 key购买 nike

我想修复屏幕底部的页脚,如果屏幕高度增加或减少,它会出现在屏幕底部,它永远不会比屏幕高度短?

HTML

<div class="footer">

<p> <a href="../info/about.php">About </a><a href="../info/help.php">Help </a><a href="../info/terms.php">Terms </a><a href="../info/privacy.php">Privacy </a><a href="../info/advertise.php">Advertise</a><a> - </a>@2016 webste</p>

</div>

CSS

.footer {
background-color:#fafafa;
text-align: center;
height:30px;
margin-top:10%;
}

.footer p {
color: #3c4a50;
line-height: 25px;
font-size: 13.3333px;
font-family: Arial;
}

.footer a {
color: #3c4a50;
text-decoration: none;
font-size: 13.3333px;
line-height: normal;
padding-right:0.5%;
}

.footer a:hover {
color: #252d31;
font-size:95%;
}

最佳答案

添加这个CSS

.footer {
position: fixed;
bottom: 0;
}

关于javascript - 如何修复屏幕底部的页脚?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41851294/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com