Created
March 4, 2013 21:14
-
-
Save bballentine/5085733 to your computer and use it in GitHub Desktop.
Picture element with srcset example
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 width="500" height="500"> | |
<source media="(min-width: 45em)" srcset="large-1.jpg 1x, large-2.jpg 2x"> | |
<source media="(min-width: 18em)" srcset="med-1.jpg 1x, med-2.jpg 2x"> | |
<source srcset="small-1.jpg 1x, small-2.jpg 2x"> | |
<img src="small-1.jpg" alt=""> | |
<p>Accessible text</p> | |
</picture> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment