Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
-webkit-min-device-pixel-ratioJavaScript 中的 css 标签是如何实现的?
-webkit-min-device-pixel-ratio
如果我正确理解了您的问题,您可以使用对象的以下属性在 JavaScript 中访问此属性window:
window
window.devicePixelRatio
任何 CSS 属性都有对应的style对象属性。这包括供应商扩展。
style
elem.style.WebkitMinDevicePixelRatio = "...";