-
Notifications
You must be signed in to change notification settings - Fork 0
/
CSS media query.html
58 lines (49 loc) · 1.19 KB
/
CSS media query.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Media query</title>
<style>
body{
background-color: red;
}
@media screen and (orientation: portrait) {
body{
border: 2px solid purple;
}
}
@media only screen and (max-width: 455px){
body{
background-color: blue;
}
.boxes{
flex-direction: column;
}
}
/* @media not|only mediatype and (expressions){
CSS-Code;
} */
.boxes{
display: flex;
}
.box{
width: 344px;
height: 344px;
background-color: steelblue;
padding: 3px;
margin: 3px;
}
</style>
</head>
<body>
<div>
hey i am a red body guy!
</div>
<div class="boxes">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</body>
</html>