-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgrid_layout.html
56 lines (52 loc) · 1.33 KB
/
grid_layout.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
<html lang="en">
<head>
<meta charset="UTF-8">
<title>grid</title>
<style>
.container {
width:1000px;
height:300px;
background-color: black;
display: grid;
grid-template-columns: repeat(10, 100px);
grid-template-rows: 50px 350px 50px;
grid-template-areas:
". h h h h h h h h ."
"c c c c c c c c m m"
".f f f f f f f f ."
}
.header {
grid-area: h;
background-color:aqua;
}
.menu {
grid-area: m;
background-color: pink;
}
.content {
grid-area: c;
background-color: orange;
}
.footer {
grid-area: f;
background-color: lightblue;
}
@media screen and (min-width:600px) {
.container{
grid-template-areas:
"m m h h h h h h h h"
"c c c c c c c c c c"
"f f f f f f f f f f"
}
}
</style>
</head>
<body>
<div class='container'>
<div class='header'>HEADER</div>
<div class='menu'>MENU</div>
<div class='content'>CONTENT</div>
<div class='footer'>FOOTER</div>
</div>
</body>
</html>