这是关于移动网络的每一篇文章都提到的,但我无处可以找到这个属性究竟是什么衡量的解释.
任何人都可以详细说明这样的查询是什么?
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (-o-device-pixel-ratio: 3/2),
only screen and (min-device-pixel-ratio: 1.5) {
//high resolution images go here
}
Run Code Online (Sandbox Code Playgroud) 我想知道如何计算-webkit-device-pixel-ratio .我已经读过这个:http: //www.quirksmode.org/blog/archives/2012/06/devicepixelrati.html.但是我无法清楚地理解它.我还想知道是否有一个列表,哪些设备使用哪个像素比.安卓网站说
Android浏览器和WebView支持CSS媒体功能,允许您为特定屏幕密度创建样式 - -webkit-device-pixel-ratio CSS媒体功能.应用于此功能的值应为"0.75","1"或"1.5",以指示样式分别适用于具有低密度,中密度或高密度屏幕的设备.
但我发现我们需要使用-webkit-device-pixel-ratio = 2来使网络应用程序在768 x 1280分辨率屏幕上兼容.
在设备检测中,新iPhone 8,iPhone 8 Plus和iPhone X的用户代理是什么?
css ×2
android ×1
frontend ×1
html ×1
iphone ×1
iphone-x ×1
javascript ×1
oneplusthree ×1
ui-design ×1
user-agent ×1
web-testing ×1