2013-11-24 57 views
1

我有這樣的媒體查詢,在同一個文件:手寫媒體查詢半工作

@media only screen and (max-width: 47.999em) 
    // rest of css/stylus here 

@media only screen and (min-width: 48em) 
    // rest of css/stylus here 

這工作時,我用我的臺式機瀏覽器和下開發工具/設置/覆蓋變化的設備規格。

但是不工作在iPhone上& Android。

任何想法我失蹤?

回答

1

發現它!

xxx-device-width應該是 - 我沒有使用這個詞device

@media only screen and (max-device-width: 47.999em) 
    // rest of css/stylus here 

@media only screen and (min-device-width: 48em) 
    // rest of css/stylus here 
0

取而代之。

@media only screen and (max-device-width: 47.999em) 
    // rest of css/stylus here 

@media screen and (min-device-width: 48em) 
    // rest of css/stylus here 
+0

我不明白你的答案抱歉。我使用手寫筆,你知道這是正確的嗎? – Rikard

+0

獲取媒體值並將其放入手寫筆中。您的問題是媒體查詢問題,而不是手寫筆問題。 – numbers1311407

+0

再次感謝您看我的問題。這並沒有解決它。我一直在閱讀並發現現在的解決方案。乾杯! – Rikard