Created
April 22, 2014 09:59
-
-
Save hjortureh/11172649 to your computer and use it in GitHub Desktop.
Responsive picture element
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
<picture> | |
<source media="(min-width: 40em)" srcset="big.jpg 1x, big-hd.jpg 2x"> | |
<source srcset="small.jpg 1x, small-hd.jpg 2x"> | |
<img src="fallback.jpg" alt=""> | |
</picture> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment