Phonegap应用程序文本和布局太小 [英] Phonegap Application text and layout too small
问题描述
我最近使用html,css,javascript构建了一个Android应用程序,并通过phonegap运行他们来创建实际的应用程序。我在一部手机中遇到的问题之一是文本看起来太小。还有一些图像也有点小。我添加了一个视口元标记,但它似乎也不工作。以下是元标记:
I recently build an android app using html, css, javascript and running them through phonegap to create the actual app. One of the problems I encountered in one phone is that the text looks too small. Also some images are a little small as well. I added a viewport meta tag but it doesnt seem to work either. Here are the meta tags:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" />`
这是它的外观
This is how it looks
这是它的应该是:
This is how its supposed to look:
推荐答案
我有同样的问题,并解决了它改变视口。
我也认为问题是phonegap,但它真的是用于测试的设备有不同的dpi。
I had the same problem and solved it changing the viewport. I also thought the problem was phonegap, but it really was that the devices used for testing had different dpi.
我的解决方案是更改target-densitydpi在视口上:
My solution was to change the target-densitydpi on the viewport to:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, target-densitydpi=medium-dpi, user-scalable=0" />
希望它有帮助
这篇关于Phonegap应用程序文本和布局太小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!