问题描述
@media only screen and (max-device-width:480px),
only screen and (-webkit-min-device-pixel-ratio: 2)
{ /*iphone css*/ }
max-device width 有意义,但像素比率对我没有任何意义。感谢。
max-device width makes sense but pixel ratio doesn't make any sense to me. thanks.
推荐答案
从
并根据
每个CSS像素的设备像素数。
Gives the number of device pixels per CSS pixel.
注意:此媒体功能也由Webkit实现为
-webkit-device-pixel-ratio。由Gecko实现的最小和最大前缀被命名为min-moz-device-pixel-ratio和
max-moz-device-pixel-ratio;但是
Webkit实现的相同前缀分别命名为-webkit-min-device-pixel-ratio和
-webkit-max-device-pixel-ratio。
Note: This media feature is also implemented by Webkit as -webkit-device-pixel-ratio. The min and max prefixes as implemented by Gecko are named min--moz-device-pixel-ratio and max--moz-device-pixel-ratio; but the same prefixes as implemented by Webkit are named -webkit-min-device-pixel-ratio and -webkit-max-device-pixel-ratio.
这篇关于-webkit-min-device-pixel-ratio:2代表什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!