forked from scottjehl/picturefill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo-01.html
33 lines (26 loc) · 1.47 KB
/
demo-01.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Picturefill - Demo</title>
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400' rel='stylesheet' type='text/css'>
<link href='../examples/styles.css' rel='stylesheet' type='text/css'>
<script>
// Picture element HTML shim|v it for old IE (pairs with Picturefill.js)
document.createElement( "picture" );
</script>
<script async="true" src="../dist/picturefill.js"></script>
</head>
<body>
<a href="http://responsiveimages.org/" class="ricg"><img src="https://raw.github.com/ResponsiveImagesCG/meta/master/logo/Web/RICG_logo_small.png"></a>
<h3>An img with "srcset" and sizes" attributes:</h3>
<pre><code><img sizes="(min-width: 40em) 80vw, 100vw"
srcset="../examples/images/medium.jpg 375w, ../examples/images/large.jpg 480w, ../examples/images/extralarge.jpg 768w" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia">
</code></pre>
<p>Here's how that renders in the browser. Feel free to resize to see it change.</p>
<img sizes="(min-width: 40em) 80vw, 100vw"
srcset="../examples/images/small.jpg 375w, ../examples/images/large.jpg 480w, ../examples/images/extralarge.jpg 768w" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia">
</body>
</html>