【发布时间】:2012-10-24 19:22:19
【问题描述】:
我正在实现一个 phonegap 应用程序。这里一切都很好,但是当我谈论设备规格时:
1)BlackBerry Bold Touch 9900 屏幕规格如下
Body Dimensions 115 x 66 x 10.5 mm (4.53 x 2.60 x 0.41 in)
Weight 130 g (4.59 oz)
Keyboard QWERTY Display Type TFT capacitive touchscreen, 16M colors
Size 640 x 480 pixels, 2.8 inches (~286 ppi pixel density)
但是当我在 java 脚本中测试以下函数时:
function findScreenSize()
{
alert("width:"+window.innerWidth +"Height:"+ window.innerHeight);
}
它显示 SIZE 宽度:356 高度:267 (356 x 267)
2)BlackBerry Bold Touch 9930 屏幕规格如下
Body Dimensions 115 x 66 x 10.5 mm (4.53 x 2.60 x 0.41 in)
Weight 130 g (4.59 oz)
Keyboard QWERTY - Touch-sensitive controls
Display Type TFT capacitive touchscreen, 16M colors
Size 640 x 480 pixels, 2.8 inches (~286 ppi pixel density)
然后我运行相同的 javaScript 函数,得到以下输出:
它显示 SIZE 宽度:417 高度:313 (417 x 313)
为什么会这样?
谁能知道核心像素和HTML像素之间的关系请给出答案
【问题讨论】:
标签: blackberry browser