2017-08-11 113 views

回答

2

使用位置固定:使用下面的代碼

.menubar { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: {your height} 
} 
+0

我如何找出放入的高度?也謝謝你。 –

+0

這取決於你或你的設計師 - 單位可以px,em,rem等。 – 7zark7

+0

我得到它的工作,我不得不添加#menubar而不是.menubar我也只是增加了15%。謝謝! –

0

嘗試。

.menubar { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 999; 
} 
+0

我得到它的工作,我不得不添加#menubar而不是.menubar。謝謝! –

+0

永遠歡迎:) – PraveenKumar

0

把這個你的CSS包裝頭

位置:固定; top:0;身高:15%;寬度:100%; z-index:999;

+0

你可以發佈結果是什麼? – user8256287

相關問題