Native resolution 1125 × 2436 px at 3× · 458 PPI · 5.85″ · 9:19.5. Design at 375 × 812 and export assets at 3×.
| Property | Value |
|---|---|
| CSS viewport (portrait) | 375 × 812 px |
| CSS viewport (landscape) | 812 × 375 px |
| Native resolution | 1125 × 2436 px |
| Device pixel ratio | 3× |
| Pixel density | 458 PPI |
| Screen diagonal | 5.85 in |
| Panel size | 2.46 × 5.32 in |
| Aspect ratio | 9:19.5 |
| Total pixels | 2.74 MP |
| Released | 2017 |
| Operating system | iOS |
| Safe area (top / bottom) | 44 / 34 px |
Among the 130 phones on this site, the iPhone X has the 92th largest CSS viewport area. Its 375 px width is 24 px below the 399 px average for this category.
Targeting the iPhone X in CSS
Device-specific media queries are brittle — a new model with the same width will not match. Use them for genuine per-device fixes only, and prefer width buckets for layout.
/* Target iPhone X specifically */
@media only screen
and (device-width: 375px)
and (device-height: 812px)
and (-webkit-device-pixel-ratio: 3) {
/* … */
}
/* More useful in practice — the width bucket it falls into */
@media (min-width: 375px) { /* … */ }
Safe area on the iPhone X
Notch. Content placed inside the top 44 px or the bottom 34 px will sit under system UI unless you inset it.
/* iPhone X safe area — requires viewport-fit=cover */
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
.app {
padding-top: env(safe-area-inset-top); /* 44px */
padding-bottom: env(safe-area-inset-bottom); /* 34px */
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
Compare with other iPhone models
| Device | CSS viewport | Native | DPR | PPI | Diagonal |
|---|---|---|---|---|---|
| iPhone X | 375 × 812 | 1125 × 2436 | 3× | 458 | 5.85″ |
| iPhone 8 Plus | 414 × 736 | 1080 × 1920 | 3× | 401 | 5.5″ |
| iPhone 8 | 375 × 667 | 750 × 1334 | 2× | 326 | 4.7″ |
| iPhone XS | 375 × 812 | 1125 × 2436 | 3× | 458 | 5.85″ |
| iPhone XR | 414 × 896 | 828 × 1792 | 2× | 326 | 6.06″ |
| iPhone 7 Plus | 414 × 736 | 1080 × 1920 | 3× | 401 | 5.5″ |
| iPhone XS Max | 414 × 896 | 1242 × 2688 | 3× | 458 | 6.46″ |
| iPhone 7 | 375 × 667 | 750 × 1334 | 2× | 326 | 4.7″ |
| iPhone SE (1st gen) | 320 × 568 | 640 × 1136 | 2× | 326 | 4″ |
Questions about the iPhone X screen
What is the screen size of the iPhone X?
The iPhone X has a 5.85-inch display. In CSS the viewport measures 375 × 812 px in portrait, and the panel itself has 1125 × 2436 physical pixels at 458 PPI.
What resolution should I design for on the iPhone X?
Design at 375 × 812 and export assets at 3×. That gives you 1125 × 2436 px images, which is exactly what the panel renders. Designing directly at 1125 × 2436 means every measurement is 3 times larger than the CSS values you will write.
What is the device pixel ratio of the iPhone X?
The iPhone X reports a device pixel ratio of 3. One CSS pixel therefore covers 9 device pixels. You can read it in JavaScript with window.devicePixelRatio.
What are the safe area insets on the iPhone X?
In portrait the safe area inset is 44 px at the top and 34 px at the bottom (Notch). Use env(safe-area-inset-*) rather than hard-coding these — the values change per device and per orientation.
Which other devices have the same viewport as the iPhone X?
4 other devices share the 375 × 812 CSS viewport: iPhone 13 mini, iPhone 12 mini, iPhone 11 Pro, iPhone XS. A layout that works on one works on all of them.
Related
window.innerWidth/innerHeight reported by the stock browser with no browser chrome. See methodology and sources.