Retina display on iPad3 set background image using css -
i tried following css, doesnt on ipad3. 1 fourth of image fits on ipad3.what going wrong?
.titleicon { float: left; background: url(/images/sprite.png); background-position: 0px 0px; width: 16px; height: 16px; } @media screen , (-webkit-min-device-pixel-ratio: 1.5), screen , ( min--moz-device-pixel-ratio: 1.5), screen , ( -o-min-device-pixel-ratio: 3/2), screen , ( min-device-pixel-ratio: 1.5){ .titleicon{ float: left; background: url(/images/sprite-2x.png) no-repeat 0 0; background-position: 0px 0px; } }
the ipad 3 got pixelratio of 2, media queries don't work yet. add min-device-pixel-ratio: 2 code.
further reading: http://halgatewood.com/ipad-3-media-query/
Comments
Post a Comment