Skip to content

Instantly share code, notes, and snippets.

@aFarkas
Last active September 13, 2015 20:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aFarkas/1564378eac6fa933e935 to your computer and use it in GitHub Desktop.
Save aFarkas/1564378eac6fa933e935 to your computer and use it in GitHub Desktop.
pic
<picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source srcset="runner-wide.jpg" media="(min-width: 1000px)" />
<source srcset="runner-narrow.jpg" media="(min-width: 600px)" />
<!--[if IE 9]></video><![endif]-->
<img srcset="runner-square.jpg" src="runner-wide.jpg" alt="Photograph of a man running along a pier at night, with a harbour in the background" />
</picture>
<!-- or using combining fallback src with the last set -->
<picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source srcset="runner-wide.jpg" media="(min-width: 1000px)" />
<source srcset="runner-narrow.jpg" media="(min-width: 600px)" />
<!--[if IE 9]></video><![endif]-->
<img src="runner-square.jpg" alt="Photograph of a man running along a pier at night, with a harbour in the background" />
</picture>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment