CSS - Resolution

1 - About

resolution is a media feature that is used in media query to target styling rule to a specific device.

3 - Example


(max-width: 375px) and (min-resolution:192dpi) 180px

4 - Javascript Calculation

The resolution with javascript can be calculated by multiplying the device pixel ratio by 96.


console.log("The resolution of this device is "+window.devicePixelRatio*96+" dpi (ie pixel ratio of "+window.devicePixelRatio+").");


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap