媒体查询Macbook Pro视网膜

时间:2018-08-07 21:03:44

标签: media-queries retina-display

你好吗?

我试图在Retina(MacBook Pro)上利用媒体查询来监视显示器,但是我无法使浏览器无法考虑代码,我尝试了很多方法,考虑了链接:

https://css-tricks.com/snippets/css/retina-display-media-query/

视口的meta标签是这样的:


    meta content=""width=device-width," initial-scale="1," maximum-scale="2," user-scalable="no"" name=""viewport""

我尝试过:

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

我也尝试过:

@media only Screen and (min-device-pixel-ratio: 1.5), 
only screen and (Min-Resolution: 192DPI),
only screen and (min-resolution: 1.5 dppx) {

以及链接中公开的其他几种形式:https://css-tricks.com/snippets/css/retina-display-media-query/

有人可以帮忙吗?

谢谢。

0 个答案:

没有答案