-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrid.html
More file actions
107 lines (96 loc) · 1.65 KB
/
grid.html
File metadata and controls
107 lines (96 loc) · 1.65 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
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
107
<!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>
* {
box-sizing: border-box;
}
body {
width: 100vw;
height: 100vh;
margin: 0;
}
.item {
display: flex;
justify-content: center;
align-items: center;
border: 1px solid #181818;
font-size: 1.2rem;
font-weight: bold;
}
.color1 {
background-color: #d7bee2;
}
.color2 {
background-color: #a9c7d8;
}
.color3 {
background-color: #c0df9f;
}
.color4 {
background-color: #f2e5a6;
}
.color5 {
background-color: #e89d9d;
}
.color6 {
background-color: #9db2e8;
}
.color7 {
background-color: #9de8dc;
}
.color8 {
background-color: #e8c99d;
}
.container {
display: grid;
margin: 10px;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: minmax(150px, auto);
grid-gap: 10px;
grid-template-areas:
'a a a'
'b c c'
'b d g'
'e f g';
}
.color1{
grid-area: a;
}
.color2{
grid-area: b;
}
.color3{
grid-area: c;
}
.color4{
grid-area: d;
}
.color5{
grid-area: e;
}
.color6{
grid-area: f;
}
.color7{
grid-area: g;
}
</style>
</head>
<body>
<div class="container">
<div class="item color1">Item1</div>
<div class="item item2 color2">Item2</div>
<div class="item color3">Item3</div>
<div class="item color4">Item4</div>
<div class="item color5">Item5</div>
<div class="item color6">Item6</div>
<div class="item color7">Item7</div>
<div class="item color8">Item8</div>
</div>
</body>
</html>