位置绝对和底部0 [英] Position Absolute and Bottom 0

查看:103
本文介绍了位置绝对和底部0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://cdpn.io/FykHr
我似乎有一个问题, CSS属性:

http://cdpn.io/FykHr I seem to have an issue with the combined CSS properties:

position: absolute;
bottom: 0;



首先,您可以看到.footer div不是在底部。现在,将 font-size 120px 更改为 50px 并且div似乎正在按照我的方式工作。

First you can see that the .footer div doesn't isn't at the bottom. Now, change the font-size from 120px to 50px and the div seems to be working the way I inteded it to.

如何让.footer div留在底部(不固定在屏幕底部)。

How do I make the .footer div stay at the bottom (not fixed at the bottom of the screen) regardless of the size of the .content div.

推荐答案

您需要添加 position:relative; c。

这是一个父容器良好的参考绝对定位页面

Here's a good reference page on absolute positioning.

这篇关于位置绝对和底部0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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