@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 1.3 / 1), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 125dpi) {
#myElement {
background-image: url('/images/highDpiImage.png');
}
}
<div data-picture data-alt="Kittens!">
<div data-src="sm.jpg"></div>
<div data-src="med.jpg" data-media="(min-width: 400px)"></div>
<div data-src="lg.jpg" data-media="(min-width: 800px)"></div>
<div data-src="xl.jpg" data-media="(min-width: 1000px)"></div>
<!-- Fallback content for non-JS browsers. -->
<noscript>
<img src="external/imgs/sm.jpg" alt="Kittens!">
</noscript>
</div>
<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>
<img src="fallback.jpg" alt=""
srcset="small.jpg 640w 1x, small-hd.jpg 640w 2x,
med.jpg 1x, med-hd.jpg 2x"/>
#test { background-image: url(assets/regular.png); background-image: -webkit-image-set(
url(assets/test.png) 1x,
url(assets/test-hires.png) 2x
);
width:200px; height:75px; }
<img src="http://src.sencha.io/320/http://sencha.com/files/u.jpg" />