页脚位于页面底部的中心 [英] Footer won't center on the bottom of the page
本文介绍了页脚位于页面底部的中心的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的页脚完全位于每个计算机屏幕上.但是,当我在Iphone上对其进行测试时,页脚会卡在页面的中间,并且不会以水平方式进行重复.
My footer is perfectly positioned on every computer screen. But, when I test it on an Iphone, the footer get stuck in the middle of the page and is not repeating itself in a horizontal way.
我该怎么办,因此页脚也停留在Iphone屏幕和其他智能手机的底部?
What can I do, so the footer also stays on the bottom of an Iphone screen and other smartphones?
这是我页脚的CSS:
#footer {
position:absolute;
bottom:0;
width:100%;
height:270px;
background-image:url(images/footer.png);
}
推荐答案
将位置更改为固定,希望可以解决此问题.
Change the position to fixed, hope that can solve this question.
#footer {
position:fixed;
bottom:0;
width:100%;
height:270px;
background-image:url(images/footer.png);
}
这篇关于页脚位于页面底部的中心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文