Created
April 16, 2013 15:56
-
-
Save jonbellah/5397139 to your computer and use it in GitHub Desktop.
Designing for Retina: CSS and background-images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media (-webkit-max-device-pixel-ratio: 1), | |
(max-resolution: 119.9dpi) { | |
.logo { | |
background:url(images/example.jpg); | |
} | |
} | |
@media (-webkit-min-device-pixel-ratio: 1.1), | |
(min-resolution: 120dpi) { | |
.logo { | |
background:url(images/[email protected]); | |
background-size: 100px 100px; // Half the size of the @2x image | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment