Path: blob/main/files/en-us/web/css/@media/-webkit-device-pixel-ratio/index.md
6532 views
------{{CSSRef}}
The -webkit-device-pixel-ratio is a non-standard Boolean CSS media feature which is an alternative to the standard resolution media feature.
Note: If possible, use the
resolutionmedia feature query instead, which is a standard media feature. While this prefixed media feature is a WebKit feature, other browser engines may support it. See browser compatibility below.
Syntax
The -webkit-device-pixel-ratio feature is specified as a {{cssxref("<number>")}} value. It is a range feature, meaning that you can also use the prefixed -webkit-min-device-pixel-ratio and -webkit-max-device-pixel-ratio variants to query minimum and maximum values, respectively.
Values
{{cssxref("<number>")}}
Implementation
Examples
HTML
CSS
Result
{{EmbedLiveSample("Examples")}}
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}