2010-03-03 74 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; 
}