为具有静态页脚的页面设置jquery移动最小页面高度

时间:2011-06-27 20:22:34

标签: css jquery-mobile

由于固定位置页脚在1.0b1中仍有点跳跃,我想在页面上使用静态页脚。但是,当特定页面的内容少于整个屏幕时,页脚不会像固定时那样自动固定到屏幕底部。

有没有人知道设置内容div的最小高度以强制页脚到底部的首选方法?

1 个答案:

答案 0 :(得分:6)

为您的页脚提供data-role=footer属性,您的网页有data-role=page ...

[data-role=page]{height: 100% !important; position:relative !important;}
[data-role=footer]{bottom:0; position:absolute !important; top: auto !important; width:100%;}

这就是我在我的一个项目中完成它的方式