-
Notifications
You must be signed in to change notification settings - Fork 0
/
gird-area.html
45 lines (45 loc) · 1.01 KB
/
gird-area.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
display: grid;
min-height: 100vh;
grid-template-columns: 1.5em 6fr 4fr 1.5em;
grid-template-areas:
"header header header header"
"...... body sidebar ......"
"footer footer footer footer";
}
.header {
background: #22223b;
grid-area: header;
}
.footer {
background: #4a4e69;
grid-area: footer;
}
.sidebar {
background: #9a8c98;
grid-area: sidebar;
}
.body {
background: #c9ada7;
grid-area: body;
}
</style>
</head>
<body>
<div class="header">HEADER</div>
<div class="body">BODY</div>
<div class="sidebar">SIDEBAR</div>
<div class="footer">FOOTER</div>
</body>
</html>