-webkit-min-device-pixel-ratio:2代表什么? [英] What does -webkit-min-device-pixel-ratio: 2 stand for?

查看:843
本文介绍了-webkit-min-device-pixel-ratio:2代表什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

@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.

推荐答案

http://developer.android.com/reference/android/webkit/WebView.html


-webkit-device-pixel-ratio CSS媒体查询。使用此来指定
要使用此样式表的屏幕密度。
对应值应为0.75,1或1.5,至
表示样式适用于低密度,中等
密度或高密度屏幕的设备, 分别。例如:hdpi.css样式表仅用于屏幕像素比例为1.5的设备
,这是高密度像素
的比率。

The -webkit-device-pixel-ratio CSS media query. Use this to specify the screen densities for which this style sheet is to be used. The corresponding value should be either "0.75", "1", or "1.5", to indicate that the styles are for devices with low density, medium density, or high density screens, respectively. For example: The hdpi.css stylesheet is only used for devices with a screen pixel ration of 1.5, which is the high density pixel ratio.

并根据 https://developer.mozilla.org/en/CSS/Media_queries


-moz-device-pixel-ratio

-moz-device-pixel-ratio

每个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代表什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆