如何安卓手柄PX VS DP在浏览器?手柄、浏览器、VS、PX

由网友(无处寄笺)分享简介:一切我已经发现迄今对PX和DP Android的处理似乎对于原生的Andr​​oid应用程序。Everything I've found so far on Android's handling of px and dp seems to be regarding native android application...

一切我已经发现迄今对PX和DP Android的处理似乎对于原生的Andr​​oid应用程序。

Everything I've found so far on Android's handling of px and dp seems to be regarding native android applications.

如何使用PX在他们的CSS的Andr​​oid手柄的网站?它会自动将其转换为相应的DP大小?

How does Android handle websites using px in their CSS? Does it automatically convert it to the appropriate dp size?

推荐答案

没有AFAIK,但你可以的选择不同的CSS样式表,或不同的规则样式表中,根据密度。这适用于使用 -webkit-设备像素比。或者,在JavaScript中,使用 window.devicePixelRatio 确定密度。

No AFAIK, but you can choose different CSS stylesheets, or different rules within a stylesheet, based upon density. This works using -webkit-device-pixel-ratio. Or, in JavaScript, use window.devicePixelRatio to determine the density.

阅读全文

相关推荐

最新文章