【问题标题】:what is the relation between actual pixels and html(css) pixels in blackberry?黑莓中实际像素和html(css)像素之间的关系是什么?
【发布时间】: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


    【解决方案1】:

    我得到了解决方案

    以前我使用以下元标记(在以下两个元标记中添加'

    meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    但现在我正在使用

    meta name="viewport" content="width=device-width,target-densitydpi=device-dpi,user-scalable=no,initial-scale=1.0">

    现在显示相同

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-04-30
    • 2015-08-29
    • 1970-01-01
    • 1970-01-01
    • 2020-05-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多