-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path18-media-queries.html
68 lines (61 loc) · 1.26 KB
/
18-media-queries.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSS - Media Queries</title>
<style>
body {
background-color: aquamarine;
color: white;
}
p {
font-size: 80px;
}
@media (min-width: 1601px) {
body {
background-color: seagreen;
}
p {
font-size: 7rem;
}
}
@media (min-width: 1201px) and (max-width: 1600px) {
body {
background-color: limegreen;
}
p {
font-size: 5rem;
}
}
@media (min-width: 481px) and (max-width: 1200px) {
body {
background-color: red;
}
p {
font-size: 3rem;
}
}
@media (min-width: 320px) and (max-width: 480px) {
body {
background-color: lightsalmon;
}
p {
font-size: 2rem;
}
}
@media (max-width: 319px) {
body {
background-color: blue;
}
p {
font-size: 1rem;
}
}
</style>
</head>
<body>
<p>Hello</p>
</body>
</html>