Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!
The Window.devicePixelRatio
read-only property returns the ratio of the (vertical) size of one physical pixel on the current display device to the size of one device independent pixels(dips).
There are no callbacks or events to listen to when this value changes (for example, if you drag the window between displays with different densities).
Syntax
value = window.devicePixelRatio;
Specifications
Specification | Status | Comment |
---|---|---|
CSS Object Model (CSSOM) View Module The definition of 'Window.devicePixelRatio' in that specification. |
Working Draft | Initial definition |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | ? | ? | ? | ? | ? |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? | ? | ? | ? | ? |
See also
- CSS
resolution
media query - PPK made some research on devicePixelRatio
Метки документа и участники
Метки:
Внесли вклад в эту страницу:
jsx,
Jiang-Xuan,
darktrojan,
Chris_Chan,
Sebastianz,
fscholz,
Jonathan_Watt,
teoli,
Sole
Обновлялась последний раз:
jsx,