-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
56 lines (52 loc) · 1.3 KB
/
index.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
<!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>
/* mother element */
.container{
display: grid;
grid-template-columns: repeat(5, 20vw);
grid-template-rows: repeat(5, 20vh);
gap: 5px;
}
/* child elements */
.div1{
background-color: aqua;
grid-column: 1/6;
}
.div2{
background-color: rgb(67, 46, 230);
grid-row: 2/5;
grid-column: 1/2;
z-index: 1;
}
.div3{
background-color: rgb(246, 59, 162);
grid-column: 2/5;
grid-row: 2/5;
}
.div4{
background-color: rgb(103, 234, 119);
grid-row: 2/5;
grid-column: 5/6;
}
.div5{
background-color: rgb(199, 246, 59);
grid-column: 1/6;
grid-row: 5/6;
}
</style>
</head>
<body>
<div class="container">
<div class="div1">div1</div>
<div class="div2">div2</div>
<div class="div3">div3</div>
<div class="div4">div4</div>
<div class="div5">div5</div>
</div>
</body>
</html>