-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmedia2.html
More file actions
60 lines (45 loc) · 1.16 KB
/
media2.html
File metadata and controls
60 lines (45 loc) · 1.16 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
57
58
59
60
<!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 QUERY</title>
<style>
.box{
text-align: center;
background-color: crimson;
color: white;
font-size: 50px;
display: none;
}
@media only screen and (max-width:300px)
{
#box1{
display: block;
background-color: blueviolet;
}
}
@media(min-width:450px) and (max-width:600px)
{
#box1{
display: block;
background-color: aqua;
}
}
@media(min-width:800px)
{
#box4{
display: block;
background-color: greenyellow;
}
}
</style>
</head>
<body>
<div class="box" id="box1">Windows</div>
<div class="box" id="box2">MAC-OS</div>
<div class="box" id="box3">Linux</div>
<div class="box" id="box4">UNIX</div>
</body>
</html>