-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path32mediaQueryCSS.html
More file actions
49 lines (49 loc) · 1.04 KB
/
32mediaQueryCSS.html
File metadata and controls
49 lines (49 loc) · 1.04 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
<!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>Media Query</title>
<style>
.boxes {
display: flex;
}
.box {
height: 60px;
width: 60px;
border: 2px solid #000000;
margin: 5px;
text-align: center;
}
@media screen and (max-width: 700px) {
.boxes {
background-color: #19c2bf;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.box {
border-radius: 50px;
}
}
@media screen and (min-width: 701px) and (max-width: 1000px) {
.boxes {
background-color: #d11616;
display: flex;
flex-direction: column-reverse;
gap: 30px;
}
}
</style>
</head>
<body>
<h2>Resize the window to see the effect of media query</h2>
<div class="boxes">
<div class="box">One</div>
<div class="box">Two</div>
<div class="box">Three</div>
</div>
</body>
</html>