使用@2x.png背景图像



我们目前正在不同的站点上运行一个样式表,然后是SVG,然后是PNG回退。

这也适用于视网膜图像吗?

    background: url('/sfdt/mobile/images/template/sfdt-sprite_header-elements.png') -110px 0px / 190px no-repeat;
    background: url('/sfdt/mobile/images/template/sfdt-sprite_header-elements@X2.png') -110px 0px / 190px no-repeat;

还是最好通过这样的媒体查询来运行它?

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
  only screen and (-o-min-device-pixel-ratio: 3/2),
  only screen and (min--moz-device-pixel-ratio: 1.5),
  only screen and (min-device-pixel-ratio: 1.5) {

谢谢

达里尔

通常以下行应单独工作:

background: url('/sfdt/mobile/images/template/sfdt-sprite_header-elements@X2.png') -110px 0px / 190px no-repeat;