如何对齐页脚(格)向页面底部? [英] How to align footer (div) to the bottom of the page?

查看:183
本文介绍了如何对齐页脚(格)向页面底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能解释如何使一个页脚DIV到页面的底部。从我见过的例子,他们都表现出如何使格保持可见在底部,无论你到哪儿去滚动页面。虽然我不喜欢这样吃。我希望它固定在页面的底部,所以它不会移动。鸭preciate的帮助!

Can anyone explain how to align a footer div to the bottom of the page. From the examples I've seen, they all show how to make the div stay visible at the bottom, no matter where you've scrolled the page. Although I don't want it like that. I want it fixed at the bottom of the page, so it doesn't move. Appreciate the help!

推荐答案

这是什么意思?

http://ryanfait.com/sticky-footer/

此方法只用15行CSS和几乎没有任何HTML标记。更妙的是,它是完全有效的CSS,它可以在所有主要的浏览器。 Internet Explorer 5和起来,火狐,Safari,Opera和其他。

This method uses only 15 lines of CSS and hardly any HTML markup. Even better, it's completely valid CSS, and it works in all major browsers. Internet Explorer 5 and up, Firefox, Safari, Opera and more.

这页脚将在页面的底部永久居留。这意味着,如果该含量超过浏览器窗口的高度,则需要向下滚动以查看页脚...但是,如果该含量小于浏览器窗口的高度,脚注会粘在底部浏览器窗口而不是浮在页面的​​中间

This footer will stay at the bottom of the page permanently. This means that if the content is more than the height of the browser window, you will need to scroll down to see the footer... but if the content is less than the height of the browser window, the footer will stick to the bottom of the browser window instead of floating up in the middle of the page.

下面是另一个,也许是更好的,解决方法:

Here's another, perhaps better, solution:

http://www.cssstickyfooter.com/

让我知道如果你需要与实施帮助。我希望这有助于。

Let me know if you need help with the implementation. I hope this helps.

这篇关于如何对齐页脚(格)向页面底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆