+ -
当前位置:首页 → 问答吧 → div始终居底

div始终居底

时间:2009-08-12

来源:互联网

偶今天才知道的方法,拿来跟大家分享一下:
直接给这个div的样式设置为如下即可,偶在ie7和ff下测试没有问题,没有测试宽屏显示。
#test{
           position:fixed;
            bottom:0;
            _position:absolute;
            _top:expression(document.documentElement.clientHeight +       document.documentElement.scrollTop - this.offsetHeight);
     }

作者: longxinhe   发布时间: 2009-08-12

不知道IE6如何,我是IE7.

作者: beyondband   发布时间: 2009-08-13

使用了表达式

思路确实蛮奇怪的

作者: 西门轩辕   发布时间: 2009-08-13

position:fixed;    IE6.0是不支持的

作者: w卉囹   发布时间: 2009-08-21