如果媒体查询检查设备上的像素数, 它如何区分桌面全高清显示器和全高清智能手机?
显然两者的设计非常不同(CSS 方面)..
最佳答案
你可以通过像素密度来做到这一点。
@media only screen (-moz-min-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1),
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-device-pixel-ratio: 2) {
/*This will be high ppi smart phone*/
}
关于css - 媒体查询如何检测全高清智能手机?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17662886/