CSS: Retina display media query


/ Published in: CSS
Save to your folder(s)

I needed a quick way to target high-resolution graphics. Here was my final solution


Copy this code and paste it in your HTML
  1. /* High Resolution artwork*/
  2. @media
  3. only screen and (-webkit-min-device-pixel-ratio: 2),
  4. only screen and ( min--moz-device-pixel-ratio: 2),
  5. only screen and ( -o-min-device-pixel-ratio: 2/1),
  6. only screen and ( min-device-pixel-ratio: 2),
  7. only screen and ( min-resolution: 192dpi),
  8. only screen and ( min-resolution: 2dppx) {
  9. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.