自动完成和底部的页脚

时间:2014-11-24 01:37:34

标签: jquery

我在页脚之前的页面底部有一个jquery自动完成功能。 我想知道如何在自动完成结果列表增加或减少时动态设置页脚底部。

html {
position: relative;
min-height: 100%;
}
body {
  margin-bottom: 60px;
}
#footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
  background-color: #f5f5f5;
}

1 个答案:

答案 0 :(得分:1)

你必须将身体设置为100%身高,因为#footer是身体的孩子。 目前你的身体只是它需要的高度,即60px,#footer扩展到。