Opera Mini中的桌面版和移动版 [英] Desktop web version and mobile web version in Opera Mini

查看:128
本文介绍了Opera Mini中的桌面版和移动版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个网站,我的意思是制作两个版本,台式机版本(具有完整功能)和移动版(简化桌面版本).我在CSS中使用媒体查询来调整样式.它在本机浏览器中运行良好.当我使用本机浏览器打开网站时,它将显示移动版本样式.但是以某种方式,当我使用Opera Mini打开网站时,它会一直显示桌面版本.

So I have a website and I mean to make 2 version of it, the desktop version (with full features) and mobile version (simplification of the desktop version). I'm using media query in CSS to adjust the style. It works well in native browser. When I open my web using native browser it will show the mobile version style. But somehow when I open my web using Opera Mini, it keeps showing the desktop version instead.

我已经用谷歌搜索了,没有发现任何线索.知道如何发生吗? 谢谢!

I have googled it and didn't found any clue. Any idea how does it happen? Thanks!

推荐答案

Opera Mini显示网站的桌面版本有很多原因.最有可能的原因是您的网站没有将Opera Mini正确地检测为移动网站,并且未返回正确的内容.如果您正在使用某些插件或其他软件来自动为您处理台式机与移动设备之间的路由,那可能是罪魁祸首.另外,由于Opera Mini的工作原理,这可能是设计使然.

There are a number of reasons why Opera Mini is showing the desktop version of the site. The most likely is that your website is not properly detecting Opera Mini as a mobile site and is not returning the correct content. If you're using some plugin or other piece of software that is automatically handling the routing of desktop vs. mobile for you, that might be the culprit. Also, it's possible that this is happening by design, because of how Opera Mini works.

Opera Mini 通过Opera自己的代理服务器运行Web内容,并尝试优化"内容在将其交付给用户之前.即,首先在代理服务器上呈现内容,然后将其传递到设备.对于试图为用户提供一致的移动Web体验的用户,这当然会带来各种复杂性.幸运的是,Opera提供了开发指南帮助您更好地了解正在发生的事情以及如何应对.

Opera Mini runs web content through Opera's own proxy servers and attempts to 'optimize' the content before delivering it to the user. That is, content is rendered first on the proxy server and then delivered to the device. This of course creates all kinds of complications for someone who is trying to deliver a consistent mobile web experience to their users. Fortunately, Opera provides a development guide to help give you a better sense of what's going on and how to cope with it.

以我的经验,Opera Mini是一个非常难以使用的浏览器.在Wikimedia Foundation,当我们检测到某人正在使用Opera Mini时,我们会提供非常有限的Wikipedia(和同级项目)体验.

Opera Mini is, in my experience, a very difficult browser to work with. At the Wikimedia Foundation, we server a very limited Wikipedia (and sibling project) experience when we detect someone's using Opera Mini.

您绝对应该通读 opera mini开发指南,并确保您进行的任何设备检测都正确地将Opera mini识别为移动浏览器.如果您仅使用媒体查询,则可能要重新考虑一种更强大的移动检测方法,或者相应地调整设计以适用于Opera mini.祝你好运!

You should definitely read through the opera mini development guide and make sure that any device detection you're doing is correctly recognizing opera mini as a mobile browser. If you're just using media queries, you may either want to reconsider a more robust approach to mobile detection, or adjust your design accordingly to work for opera mini. Good luck!

这篇关于Opera Mini中的桌面版和移动版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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