jangxx
jangxx

Reputation: 1019

How's the css tag "-webkit-min-device-pixel-ratio" implemented in Javascript?

How's the css tag -webkit-min-device-pixel-ratio implemented in JavaScript?

Upvotes: 0

Views: 225

Answers (2)

SquareFeet
SquareFeet

Reputation: 641

If I've understood your question correctly, you can access this property in JavaScript using the following property of the window object:

window.devicePixelRatio

Upvotes: 1

Niet the Dark Absol
Niet the Dark Absol

Reputation: 324650

Any CSS property has a corresponding property of the style object. This includes vendor extensions.

elem.style.WebkitMinDevicePixelRatio = "...";

Upvotes: 0

Related Questions