2015-06-16 18 views
0

當我在手機上刷新我的網站時,我的響應式設計(菜單欄)不起作用。不像消失一樣工作......它只是消失了。 只有菜單欄。當使用移動版本時,菜單欄消失

因此,這裏是我的媒體查詢代碼:

@media all and (max-width: 800px), 
only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1024px), 
only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1024px), 
only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1024px), 
only screen and (min-device-pixel-ratio: 2) and (max-width: 1024px), 
only screen and (min-resolution: 192dpi) and (max-width: 1024px), 
only screen and (min-resolution: 2dppx) and (max-width: 1024px) { 
    #cssmenu { 
    background: black; 
    } 
} 

也許我應該添加JavaScript? 幫助!!

+0

這是我見過的最激烈的媒體查詢。你最後錯過了一個結束'}'。 –

+0

是的,我有那個...我只是沒有寫出整個CSS代碼... 你是怎麼意思激烈? 還有什麼爲什麼它不工作? 我在想,也許像js這樣的其他代碼,搞砸了......這可能嗎? – Nanina

+0

嘗試刪除(或在瀏覽器中關閉)你的JS來排除。這將有助於您發佈相應的html標記。爲了幫助排除故障,最好將媒體查詢簡化爲基本操作(刪除供應商前綴和邏輯運算符,並使用max-width屬性) –

回答

0

這是在你的CSS代碼行224上顯示沒有。刪除它,你應該很好。

#cssmenu > ul { 
    display: none; 
} 
相關問題