forked from cypress-io/cypress-example-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimg-srcset.html
More file actions
56 lines (48 loc) · 1.03 KB
/
Copy pathimg-srcset.html
File metadata and controls
56 lines (48 loc) · 1.03 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Responsive HTML images demo</title>
<style>
html {
font-family: sans-serif;
background-color: gray;
}
body {
max-width: 1200px;
margin: 0 auto;
background-color: white;
}
header {
background: url(header.jpg) no-repeat center;
height: 200px;
}
section {
padding: 20px;
}
p {
line-height: 1.5;
}
img {
display: block;
margin: 0 auto;
max-width: 100%;
}
</style>
</head>
<body>
<header>
</header>
<main>
<section>
<h1>My website</h1>
<img srcset="elva-fairy-480w.jpg 480w,
elva-fairy-800w.jpg 800w"
sizes="(max-width: 600px) 480px,
800px"
src="elva-fairy-800w.jpg" alt="Elva dressed as a fairy">
</section>
</main>
</body>
</html>