有人可以解释一下css中的错误,称为dot-per-CSS-inch&不是每物理英寸的点数

时间:2016-03-10 05:27:12

标签: html css angularjs ionic-framework dpi

我在ubntu工作,我使用mi mobile进行远程调试我得到的是蓝色以下的我不确定是错误。

远程调试时我收到此错误:

 Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: not all, (-webkit-min-device-pixel-ratio: 1.5), not all, (min-resolution: 144dpi), (min-resolution: 1.5dppx) 

我认为此错误是由于质量目的而发生但我不了解dppx和dpi,如果您知道此错误的解决方案,请帮助我。

1 个答案:

答案 0 :(得分:1)

只是为了跟进,这是一个ERROR

<强>解决方案:

如果您有dppx覆盖,则不应再向您显示此消息。

请找FIDDLE进行测试。

<强> CODE:

  @media
    only screen and (-webkit-min-device-pixel-ratio: 2),
    only screen and (   min--moz-device-pixel-ratio: 2),
    only screen and (     -o-min-device-pixel-ratio: 2/1),
    only screen and (        min-device-pixel-ratio: 2),
    only screen and (                min-resolution: 192dpi),
    only screen and (                min-resolution: 2dppx) { 

      /* Retina-specific stuff here */

  }
相关问题