2010-03-03 37 views

回答

12

您可以使用position: fixed; bottom: 0px。但在IE6中不起作用。

<style type="text/css"> 
    #footer { position: fixed; bottom: 0px; } 
</style> 

<div id="footer">I am at the bottom of the window</div> 
+2

IE6支持也有几个解决方法。尝试搜索ie-fixed.htc - .htc文件将强制IE了解位置。 – easwee 2010-03-03 13:41:37

0

请尝试使用此功能。这里的底部栏是用div元素制成的。我会想象你可以使用任何你想要的元素,只需引用CSS类。我只测试了div元素

/* HTML */ 
<div class='always-at-bottom'>Always at bottom!</div> 

/* CSS */ 
.always-at-bottom { 
    height:40px; 
    position: fixed; 
    left: 0; 
    bottom: 0%; 
    width: 100%; 
    background-color: blue; 
}