yonglan 发表于 2014-4-2 18:50:00

兼容IE6的底部悬浮CSS

#footpanel {
        position: fixed;
        bottom: 0; left: 50%;
        z-index: 9999; /*--Keeps the panel on top of all other elements--*/
        background: #e3e2e2;
        width: 978px; height:48px;
        margin-left:-489px;
}

*html #footpanel { /*--IE6 Hack - Fixed Positioning to the Bottom--*/
        margin-top: -1px; /*--prevents IE6 from having an infinity scroll bar - due to 1px border on #footpanel--*/
        position: absolute;
        top:expression(eval(document.compatMode &&document.compatMode=='CSS1Compat') ?documentElement.scrollTop+(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));
}

页: [1]
查看完整版本: 兼容IE6的底部悬浮CSS