-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtut10.htm
More file actions
70 lines (65 loc) · 1.67 KB
/
tut10.htm
File metadata and controls
70 lines (65 loc) · 1.67 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
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Media Queries</title>
<style>
.box{
background-color: red;
color: black;
font-size: 72px;
text-align: center;
display: none;
}
@media only screen and (max-width:500px) {
#box1{
display: block;
background-color: cornflowerblue;
}
}
@media only screen and (min-width: 501px) and (max-width:1100px) {
#box2{
display: block;
background-color:blueviolet;
}
}
@media only screen and (min-width: 1101px) and (max-width:1800px) {
#box3{
display: block;
background-color:rgb(25, 194, 53);
}
}
@media only screen and (min-width: 1801px) {
#box4{
display: block;
background-color:rgb(211, 247, 9);
}
}
.item{
background-color: yellow;
border: 3px solid black;
padding: 12px 23px;
}
#navbar{
grid-area: navbar;
}
#section{
grid-area: section;
}
#aside{
grid-area: aside;
}
footer{
grid-area: footer;
}
</style>
</head>
<body>
<div class="box" id="box1">Main ek Iphone hu</div>
<div class="box" id="box2">Main ek tablet hu
</div>
<div class="box" id="box3">Main ek laptop hu</div>
<div class="box" id="box4"> Main ek wide screen PC hu</div>
</body>
</html>