Question

Does a CSS pixel correspond to a physical pixel on the screen?

#css

Answer

Not necessarily.

It depends on the value of the read-only Window property devicePixelRatio.

The value of devicePixelRatio is the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.

https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio

Learn

Author

xavi

Reviews
Last
next

Students 1