Last active
December 11, 2015 00:38
-
-
Save jesperbjensen/4517454 to your computer and use it in GitHub Desktop.
A simple css file, for adding support for CSS-classes that gives you the ability to serve high-resolution 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
.hidden-normal-res { | |
display: none; | |
} | |
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | |
.hidden-high-res { | |
display: none; | |
} | |
.hidden-normal-res { | |
display: inherit; | |
} | |
} |
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
<img class="hidden-high-res" style="width: 100px; height: 100px" src="100x100.png" /> | |
<img class="hidden-normal-res" style="width: 100px; height: 100px" src="200x200.png" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment