在Chrome上模拟iPhone X [英] Emulate iPhone X on Chrome

查看:567
本文介绍了在Chrome上模拟iPhone X的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Chrome上模拟iPhoneX.我发现了以下信息:

Height: 5.65 inches (143.6 mm)
Width: 2.79 inches (70.9 mm)

您能告诉我下面的表格应该提供哪些值吗?

iPhone X分隔符

这是 设备像素比(DPR)

如果要从非Retina机器上模拟Retina设备,反之亦然,请调整设备像素比率.器件像素比率(DPR)是逻辑像素和物理像素之间的比率.具有Retina显示屏的设备(例如Nexus 6P)具有比标准设备更高的像素密度,这会影响视觉内容的清晰度和大小.

解决方案

根据 iPhone X人机界面指南,您应输入:

  • 375 (
  • 宽度
  • )
  • 812 表示高度
  • 3 (
  • 设备像素比率
  • )

由于比例因子为3,因此应除以物理分辨率(1125px×2436px)除以3 以得到逻辑解决方案.

有关用户代理字符串,请查看此答案.

I need to emulate an iPhone X on Chrome. I have found the info below:

Height: 5.65 inches (143.6 mm)
Width: 2.79 inches (70.9 mm)

Can you tell me which values should I give to the form below?

iPhone X sepecifications

This is what Device pixel ratio (DPR) is

If you want to emulate a Retina device from a non-Retina machine or vice versa, adjust the Device pixel ratio. The device pixel ratio (DPR) is the ratio between logical pixels and physical pixels. Devices with Retina displays, such as the Nexus 6P, have higher pixel density than standard devices, which can affect the sharpness and size of visual content.

解决方案

According to the iPhone X Human Interface Guidelines, you should enter:

  • 375 for the width
  • 812 for the height
  • 3 for the device pixel ratio

Because the scale factor is 3, you should divide the physical resolution (1125px × 2436px) by 3 to get the logical resolution.

For the user agent string, check out this answer.

这篇关于在Chrome上模拟iPhone X的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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