开发者

jQuery Mobile website is strangely magnified in Opera Mobile 10 despite 100% zoom level

I've developed a mobile website based on jQuery Mobile. Eve开发者_开发技巧rything works on my own Windows Mobile device with Opera Mobile 10, but a customer of mine always sees the page magnified.

I thought that he might have a zoom setting >100% in Opera Mobile, but he claims that this is definitely not the case.

The same problem also occurs on the jQuery Mobile test site ( http://jquerymobile.com/test/ ) . Here's a screenshot of the site as displayed on my customer's device:

jQuery Mobile website is strangely magnified in Opera Mobile 10 despite 100% zoom level

Any idea what might be going wrong here? I was unable to reproduce this problem on my own device or in an emulator.

My customer's device is a HTC HD2 runing Windows Mobile 6.5 and Opera 10.

Thanks,

Adrian


I'll just paste the answer by David Storey which was made for this on Opera Dev forums. It is not specifically about the 100% issue, but there might be similar issues related to the viewport tag issue, for people getting across it.

Opera Mobile assumes that any document with a mobile specific doctype, such as XHTML Mobile Profile or XHTML Basic are designed and optimised for mobile, while documents with a regular doctype are not optimised for mobile generally. Thus if there is a desktop doctype the overview mode is enabled, which you can control with the viewport meta element. If there is a mobile doctype the overview mode is disabled and a regular 1:1 viewport is used.

There were some bugs in the viewport meta element support in Opera Mobile. They should be fixed in the latest version.


Did you try adjusting the scale?

<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">


You should use xhtml mobile doctype

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">


Try adding <meta name="viewport" content="width=device-width">. Opera seems to behave better when it's there.

If that doesn't work, please file a bug report https://bugs.opera.com/wizard/.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜