2011-11-25 51 views
1

如果在向下滾動頁面時滑動向下的面板保持固定狀態,則執行固定標題時遇到問題。我目前正在使用Jeremie Tisseau的滑動面板代碼:http://web-kreation.com/index.php/tutorials/nice-clean-sliding-login-panel-built-with-jquery/帶有向下滑動面板的固定標題欄

這是我一直在努力的:http://localsq.tumblr.com/test。當你點擊「What,When,Where」時,面板滑落,但當你向下滾動頁面時,面板不會保持固定...

有誰知道如何解決這個問題?謝謝!

回答

2

標識爲toppanel的元素設置爲position : absolute,因此應該更改爲position : fixed,以便隨「What,When,Where」文本一起移動。我在FireBug中對您的代碼進行了更改,並且在向下滾動時,面板保持固定在頁面的頂部。

此代碼:

#toppanel { 
    margin-left: auto; 
    margin-right: auto; 
    position: absolute; 
    text-align: center; 
    top: 25px; 
    width: 100%; 
    z-index: 999; 
} 

應更改爲:

#toppanel { 
    margin-left: auto; 
    margin-right: auto; 
    position: fixed; 
    text-align: center; 
    top: 25px; 
    width: 100%; 
    z-index: 999; 
} 
+0

非常感謝碧玉! (O: –

相關問題