-
Notifications
You must be signed in to change notification settings - Fork 0
/
newmf.html
106 lines (100 loc) · 2.73 KB
/
newmf.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!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>Document</title>
<style>
#navigation{
background-color: yellow;
height: 80px;
font-size: 40px;
margin-bottom:40px;
}
#boxes{
display: grid;
grid-template-columns:repeat(4,200px);
grid-template-rows:200px;
gap:20px;
margin:auto;
}
#boxes>div{
font-size:25px;
}
#boxes>div:nth-child(1){
background-color: red;
}
#boxes>div:nth-child(2){
background-color: green;
}
#boxes>div:nth-child(3){
background-color: blue;
}
#boxes>div:nth-child(4){
background-color: grey;
}
@media all and (min-width: 481px) and (max-width: 761px){
#navigation{
width:auto;
}
#boxes{
grid-template-columns: repeat(2,1fr);
grid-template-rows:repeat(2,200px);
}
#boxes>div:nth-child(1){
background-color: red;
order:-3;
}
#boxes>div:nth-child(2){
background-color: green;
order:-1;
}
#boxes>div:nth-child(3){
background-color: blue;
order:-2;
}
#boxes>div:nth-child(4){
background-color: grey;
order:0;
}
}
@media all and (min-width: 100px) and (max-width: 480px){
#boxes{
grid-template-columns:repeat(1,1fr);
grid-template-rows:repeat(4,100px);
display: grid;
}
#boxes>div:nth-child(1){
width:200px;
background-color: red;
order:-2;
}
#boxes>div:nth-child(2){
width:200px;
background-color: green;
order:0
}
#boxes>div:nth-child(3){
width:200px;
background-color: blue;
order:1;
}
#boxes>div:nth-child(4){
width:200px;
background-color: grey;
order:-1
}
}
</style>
</head>
<body>
<div id="navigation">Navigation</div>
<div id="boxes">
<div>Box-1</div>
<div>Box-2</div>
<div>Box-3</div>
<div>Box-4</div>
</div>
</body>
</html>