Galaxy Tab 上的 1280x800 与本地环境中的 1280x800 不同吗?
目前我们正在开发一个新的 Web 应用程序。客户说至少要支持1280x800及以上。在当地环境中,它看起来不错并且很合适。但当我在 Galaxy Tab 上浏览时,1280x800 的网站看起来不像在 1280x800 上运行的网站。在 Galaxy Tab 上,尽管 Tab 的硬件设置显示为 1280x800,但网站被截断。所以该网站对于 1280x800 来说太大了。
我知道在编写 Android 应用程序时必须关心不同的屏幕和密度,但我们讨论的是网站而不是 Android 应用程序,我不确定是什么导致了这种行为。有人可以向我解释这是什么原因吗?
[更新]
Firefox 的屏幕截图(正确)
现在在 Galaxy Tab 中(已截断)
Currently we're developing a new Web Application. Customer says that it should support at least 1280x800 and above. On local environments it looks fine and it fits. But when I browse it on Galaxy Tab, the 1280x800 website doesn't look like a website running on 1280x800. On Galaxy Tab the website is truncated although the hardware setting of the Tab says that it is 1280x800. So the website is too big for 1280x800.
I know that you have to care about different screens and densities when you write an Android application, but we are talking about a website and not an Android application and I'm not sure what causes this behavior. Can anybody explain to me what's the reason for that?
[UPDATE]
Screenshot of Firefox (correct)
And now in Galaxy Tab (truncated)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试将其添加到 HTML 文档的
中:
需要这样做的原因是高 DPI 设备默认情况下不会将 CSS px 转换为屏幕像素,因为大多数内容都经过优化对于低 DPI 屏幕来说,它太小而无法阅读。另一种思考方式是,在这些设备上,网站最初会缩放 1.5 甚至 2 倍。通过提供指定的
标记,您可以覆盖此行为并设置初始比例为 1。
You could try adding this to the
<head>
of your HTML document:The reason why this is needed is that high-DPI devices do not translate CSS px to screen pixels by default because most content is optimized for low-DPI screens and would be just too small to read. Another way to think about this is that, on these devices, websites are initially scaled by a factor of 1.5 or even 2. By giving the specified
<meta>
tag you can override this behavior and set the initial scale to 1.这可能是由不同的像素间距引起的。我建议您阅读本文。
这是针对不同屏幕尺寸的像素间距计算器。
It can be caused by different pixel pitches. I'd recommend you to read this.
Here is a pixel pitch calculator for different screen sizes.