PhoneGap和Retina显示 [英] PhoneGap and Retina display

查看:99
本文介绍了PhoneGap和Retina显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用phoneGap为iPhone创建了一个应用程序,但我确定它不使用视网膜显示器,而不是使用旧的iPhone3分辨率。

I'm creating an app for iPhone using phoneGap, but I'm sure it is not working using retina display, instead of that, it is using the old iPhone3 resolution.

当使用phoneGap开发时,有没有办法为iPhone提供2个版本?

Is there any way to have 2 versions for iPhone when developing using phoneGap? this is, one version using retina and another version with worst resolution for the older devices.

感谢

推荐答案

是的,但您需要使用CSS媒体查询或JavaScript。

Yes, but you'll need to use either CSS media queries or JavaScript.

http://troymcilvena.com/post/998277515/jquery-retina 是一个自动处理@ 2x图片的jQuery插件。

http://troymcilvena.com/post/998277515/jquery-retina is a jQuery plugin that'll automatically handle @2x images.

在CSS中,您需要使用针对 -webkit-min-device-pixel-ratio:2 的媒体查询具有更高分辨率版本的图片(并设置 background-size )。

In CSS, you'd need to use a media query targeting -webkit-min-device-pixel-ratio: 2 that replaces background images with their higher-resolution versions (and sets background-size).

这篇关于PhoneGap和Retina显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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