iPhone6 和 iPhone 6 Plus 的设备宽度 css 视口尺寸是多少

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25754848/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 02:34:19  来源:igfitidea点击:

What are the device-width css viewport sizes of the iPhone6 and iPhone 6 Plus

ioscssiphoneresponsive-designviewport

提问by hexalys

The iPhone 6 and iPhone 6 Plus were just announced. But as usual, phone specs never give the meta viewport device-widthsizes in CSS Pixels or DPR at width=device-width,initial-scale=1.

iPhone 6 和 iPhone 6 Plus 刚刚发布。但像往常一样,手机规格从来没有device-width在 CSS Pixels 或 DPR 中给出元视口大小width=device-width,initial-scale=1

Predictionshave been made, speculating on 375/414px viewport width, but that still remains unclear...

已经做出预测,推测 375/414px 视口宽度,但这仍然不清楚......

NB: Please don't speculate or post answers with the knownoverall device resolution or specs, it's not what I am looking for. I want the default responsive portrait and landscape viewport-width in pixels.

注意:请不要用已知的整体设备分辨率或规格推测或发布答案,这不是我想要的。我想要默认的响应式纵向和横向视口宽度(以像素为单位)。

回答by swiftBoy

Below is the ios Device Sizes with detailed information

下面是带有详细信息的 ios 设备大小

enter image description here

在此处输入图片说明

References

参考

回答by bitinn

(css) device-width of iPhone 6 is 375px, of iPhone 6 Plus is 414px. Note that iPhone 6 Plus report window.devicePixelRatio = 3(while not truly at 3 DPR)

(css) iPhone 6 的device-width为 375pxiPhone 6 Plus 的为 414px。请注意 iPhone 6 Plus 报告window.devicePixelRatio = 3(虽然不是真正的 3 DPR)

Update 1: just to clarify, I believe this is NOT a prediction, but actually tested. See more detailed and reputable reference. If in doubt, you can wait for device to be out.

更新 1:只是为了澄清,我相信这不是预测,而是经过实际测试。请参阅更详细和信誉良好的参考。如果有疑问,您可以等待设备出来。

Update 2: for users with Display Zoomenabled on iPhone 6, css viewport in Mobile Safari fallback to 320px(like iPhone 5); for iPhone 6 Plus, it fallback to 375px(like iPhone 6).

更新 2:对于在 iPhone 6 上启用Display Zoom 的用户,Mobile Safari 中的 css 视口回退到 320px(如 iPhone 5);对于 iPhone 6 Plus,它回退到 375px(就像 iPhone 6)。

回答by megatoad2

According to CSSpixels

根据CSSpixels

iPhone 6: 1334x750, viewport 667x375

iPhone 6:1334x750,视口 667x375

iPhone 6+: 2208x1242 *, viewport 736x414 *

iPhone 6+:2208x1242 *,视口 736x414 *

*Virtual resolution is subsampled to fit 1920×1080 screen.

* 对虚拟分辨率进行二次采样以适应 1920×1080 屏幕

回答by jeffmcneill

Device-width is indeed 375x667, but that does not mean the viewport is that size. Here is an empirical sample. Note that the numbers are rounded to the 10s. Device-width vs. reported Viewport with sample data

设备宽度确实是 375x667,但这并不意味着视口就是那个大小。这是一个经验样本。请注意,数字四舍五入到 10。 设备宽度与带有示例数据的报告视口