2017-02-14 39 views
1

我已经写了媒体查询的CSS两个镀铬不灵mozilla.It工作正常chrome.but在Mozilla工作不媒体查询在Mozilla

@media screen and (min-height:650px) 
{ 
    #customerspeak .flexslider .slides .customerBackground img { 
    height: 100vh; 
} 
#customerspeak .flex-direction-nav a { 
    margin-top: 37%; 
} 
#customerspeak .flex-next { 
    left: 62.5% !important; 
} 
#customerspeak .flex-prev { 
    left: 34% !important; 
    } 
@-moz-document url-prefix() { 

    #customerspeak .flexslider .slides .customerBackground img { 
    height: 100vh; 
    } 
    #customerspeak .flex-direction-nav a { 
    margin-top: 37%; 
    } 
    #customerspeak .flex-next { 
    left: 62.5% !important; 
} 
#customerspeak .flex-prev { 
left: 34% !important; 
} 
} 
} 
+0

@ -moz是否应该在其他媒体查询中? – Gezzasa

回答

5

尝试@media查询之前使用@-moz-document url-prefix()第一。

@-moz-document url-prefix() { 
    @media screen and (min-height:650px) { 
     /* insert code here*/ 
    } 
} 
+0

是的,我已经尝试过您的解决方案,它的工作原理如下:https://jsfiddle.net/locateganesh/eud4xkwd/ – locateganesh