我已经为chrome和mozilla编写了媒体查询css。它在chrome中运行良好,但在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;
 }
}
}

最佳答案

在查询之前先尝试使用@-moz-document url-prefix()

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

10-08 01:20