iphone - Testing retina images with css and @media -
i'm wondering how test retina images css on regular browser? tried previous code not code below , wondered if working?
it's hard tell if correct image load same images better quality.
//retina stuff @media , (-webkit-min-device-pixel-ratio: 1.5) { #home { background: url('bg-home-x2.png') no-repeat; } .shelf { background: url('shelf-x2.png') no-repeat top center; height: 111px; padding-bottom: 0px; } #pantry { background: url('bg-pantry-x2.png') no-repeat; width: 320px; height: 480px; z-index: -1; } #list { background: url('bg-cart-x2.png') no-repeat; width: 320px; height: 480px; z-index: -1; margin-top: -6px; } }
you can't default in web browser using -min-device-pixel-ratio - computers/pcs don't have required pixel ratio value test (other newer high-end laptops/displays) .
the best way use devices or family of devices you're targeting, in cases don't have them, way test media queries through emulation, perhaps 1 of following might help:
using opera mobile emulator. allows set various test environments common devices. allows define custom setups resolution , pixel density:

it's available windows, mac , linux.
there javascript-based web retina emulator, won't parse css media queries, it's simplistically checking validity/integrity of images.
if looking emulate specific ios devices, can use ios simulator (part of xcode tools) test retina displays - doesn't sound applicable , used more testing of native apps.
Comments
Post a Comment