Skip to content

Commit 991f639

Browse files
committed
Add orientation demo
1 parent bb548f2 commit 991f639

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

demos/orientation-demo.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<html>
2+
3+
<body>
4+
5+
<h1>Responsive images using the picture element for different orientations</h1>
6+
<p>Resize your browser to see the different images displayed based on the width of the viewport.</p>
7+
8+
<picture>
9+
<source
10+
media="(min-width: 1600px)"
11+
srcset="https://res.cloudinary.com/demo/image/upload/ar_16:9,c_auto,g_auto/f_auto/q_auto/c_scale,w_800/docs/hiking-man.jpg 800w, https://res.cloudinary.com/demo/image/upload/ar_16:9,c_auto,g_auto/f_auto/q_auto/c_scale,w_1600/docs/hiking-man.jpg 1600w"
12+
sizes="100vw" />
13+
<source
14+
media="(min-width: 1200px)"
15+
srcset="https://res.cloudinary.com/demo/image/upload/f_auto/q_auto/c_scale,w_600/docs/hiking-man.jpg 600w, https://res.cloudinary.com/demo/image/upload/f_auto/q_auto/c_scale,w_1200/docs/hiking-man.jpg 1200w"
16+
sizes="100vw" />
17+
<img
18+
srcset="https://res.cloudinary.com/demo/image/upload/ar_9:16,c_auto,g_auto/f_auto/q_auto/c_scale,w_400/docs/hiking-man.jpg 400w,https://res.cloudinary.com/demo/image/upload/ar_9:16,c_auto,g_auto/f_auto/q_auto/c_scale,w_800/docs/hiking-man.jpg 800w"
19+
src="https://res.cloudinary.com/demo/image/upload/f_auto/q_auto/c_scale,w_400/docs/hiking-man.jpg"
20+
alt="Man hiking"
21+
sizes="100vw" />
22+
</picture>
23+
24+
</body>
25+
26+
</html>

0 commit comments

Comments
 (0)