最小宽度:320px在Android的Opera Mini上无法正确触发 [英] min-width:320px not firing correctly on Opera Mini for Android

查看:124
本文介绍了最小宽度:320px在Android的Opera Mini上无法正确触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android上的各种浏览器中测试某些媒体查询,并在我的Samsung Galaxy S上注意到Opera Mini 6.5似乎并没有在以下代码中应用样式.

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

如果我将值降低到282,Opera Mini将会执行媒体查询中的样式.

@media screen and (min-width: 282px){

我想知道其他人是否遇到过Opera Mini无法在Android手机上正确处理媒体查询的问题.我在Android上测试过的所有其他浏览器似乎都可以在min-width:320px以及我在iOS设备上测试的Opera Mini上正常工作.

我已经设置了一些测试页来检查视口meta标签的变化.

h5bp移动2元标记- goo.gl/XfEVx

h5bp Mobile 2元标记,最大比例设置为1.0- goo.gl/mgKJA

h5bp移动3元标记- goo.gl/uxPsa

h5bp Mobile 2元标记,最大比例设置为1.0,并且Opera CSS视口标记- goo.gl/McNhj

仅视口元标记- goo.gl/QMnmp

我在Opera Mini 6.5上以纵向方向在三星Galaxy S Epic 4G上注意到了此问题.

解决方案

根据 Opera docs ,Opera Mini 6.5支持媒体查询并使用 Presto 2.8 .在Presto 2.8中,媒体查询的支持似乎是完整的. /p>

您尝试使用initial音阶还是device-width

演奏

<meta name="viewport" content="width=device-width"/>  

initial-scale=1.0

我搜索了Opera错误报告,但没有发现与此相关的任何内容.您是否有指向网页的链接,以便我们进行进一步测试.

Testing some media queries in various browsers on Android and noticed Opera Mini 6.5 on my Samsung Galaxy S does not seem to apply stlyes inside the following code.

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

It seems if I lower the value to 282, Opera Mini will excute the styles inside the media query.

@media screen and (min-width: 282px){

I'm wondering if anyone else has run into issues with Opera Mini not handling media queries correctly on Android phones. All of the other browsers I've tested on Android seemed to work fine with min-width:320px as well as my tests of Opera Mini on iOS devices.

I've set up a few test pages to check out with variations on the viewport meta tag.

h5bp Mobile 2 meta tags - goo.gl/XfEVx

h5bp Mobile 2 meta tags with maximum-scale set to 1.0 - goo.gl/mgKJA

h5bp Mobile 3 meta tags - goo.gl/uxPsa

h5bp Mobile 2 meta tags with maximum-scale set to 1.0 and Opera CSS viewport tag - goo.gl/McNhj

Viewport meta tag only -goo.gl/QMnmp

I noticed this issue on my Samsung Galaxy S Epic 4G in portrait orientation on Opera Mini 6.5.

解决方案

According to Opera docs, Opera Mini 6.5 supports Media Queries and using Presto 2.8. The support of media queries in Presto 2.8 seems to be complete.

Did you try to play with the initial scale or device-width

<meta name="viewport" content="width=device-width"/>  

or

initial-scale=1.0

I searched our Opera bug reports but I didn't see anything related to this. Do you have a link to a Web page so we can test further.

这篇关于最小宽度:320px在Android的Opera Mini上无法正确触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆