2014-02-27 75 views
1

我們目前正在使用SVG在不同網站上運行樣式表,然後使用PNG回退。使用@ 2x.png背景圖像

這也可以從視網膜圖像?

background: url('/sfdt/mobile/images/template/sfdt-sprite_header-elements.png') -110px 0px/190px no-repeat; 
    background: url('/sfdt/mobile/images/template/[email protected]') -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) { 

感謝

達里爾

回答

0

通常情況下,以下行應該單獨工作:

background: url('/sfdt/mobile/images/template/[email protected]') -110px 0px/190px no-repeat; 
+0

所以就沒有必要非視網膜圖像回落?和非視網膜設備將查看圖像罰款? – Darylb

+0

是的,你不需要回退圖像,因爲這個圖像將顯示在正常和視網膜顯示上,唯一的區別是它們在正常顯示上調整大小,但是因爲視網膜圖像的質量更好,影響圖像的質量 – ReeCube