简体   繁体   English

媒体查询在 opera mini 浏览器上不工作,但在 Firefox 和 chrome 浏览器上工作正常

[英]Media query not working on opera mini browser but works fine on firefox and chrome browser

Here is a snippet of my CSS code for the media query:这是我用于媒体查询的 CSS 代码片段:

@media (min-width: 320px) and (max-width: 480px) {

.vertical-bar{
    display: none;
}

.fa-bars{
    position: fixed;
    left:280px;
    top: 20px;
}

.fa-bars.animate{
    top: -71px;
}

.fa-bars.sticky{
    top: 25px;
}

}

The code works fine on both mobile chrome and Firefox but not on opera.该代码在移动版 chrome 和 Firefox 上都可以正常工作,但在 opera 上则不行。 I do not know why.我不知道为什么。 Is there any special keyword for opera I'm missing to include in my CSS code?我的 CSS 代码中是否有任何特殊的歌剧关键字? Please help me.请帮我。

You have to use Modernizr , or Respond ;您必须使用ModernizrRespond

Just see the documentation provided in the documents if you really want to do it.如果您真的想这样做,只需查看文档中提供的文档即可。

These two repositories that I have mentioned above will take care of everything我上面提到的这两个存储库将处理一切

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM