Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (42 sloc) 1.47 KB
<!DOCTYPE html>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width,initial-scale=1">
<script src="external/matchmedia.js"></script>
<script src="picturefill.js"></script>
body { font-family: sans-serif; max-width: 375px; margin: 50px auto; }
img { max-width: 100% }
div[data-picture] {
position: relative;
display: inline-block;
.pf-pref {
position: absolute;
right: 1em;
bottom: 1em;
background: #fff;
opacity: .8;
padding: .1em .3em;
color: #444;
font-size: .7em;
text-decoration: none;
border-radius: .2em;
font-weight: bold;
<h1>Picturefill: A &lt;picture&gt; element polyfill</h1>
<p>For more info: <a href="">see project home.</a></p>
<div data-picture data-alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia">
<div data-src="external/imgs/small.jpg"></div>
<div data-src="external/imgs/medium.jpg" data-media="(min-width: 300px)"></div>
<div data-src="external/imgs/extralarge.jpg" data-media="(min-width: 300px) and (-webkit-min-device-pixel-ratio: 1.5)"></div>
<!-- Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. -->
<noscript><img src="external/imgs/small.jpg" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"></noscript>
Jump to Line
Something went wrong with that request. Please try again.