-
Notifications
You must be signed in to change notification settings - Fork 1
/
2-4_grid.html
58 lines (57 loc) · 1.32 KB
/
2-4_grid.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
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./style.css">
<title>CSSがちょっと楽しくなる会</title>
<style>
.grid {
border: 2px solid #41337A;
padding: 20px;
width: 600px;
height: 600px;
/* gridに関する指定 */
/* display: grid; */
/* grid-template-rows: 200px 200px 200px; */
/* grid-template-columns: 200px 200px 200px; */
/* grid-template-columns: 1fr 1fr 1fr; */
}
.grid-item {
background: #41337A;
border: 3px solid #BBBBBB;
padding: 10px;
font-size: 20px;
line-height: 1em;
color: #FFFFFF;
}
/* .grid-item._1{
grid-row: 1 / 2;
grid-column: 1 / 4;
}
.grid-item._2{
grid-row: 2 / 4;
grid-column: 1 / 1;
}
.grid-item._3{
grid-row: 2 / 4;
grid-column: 2 / 4;
} */
</style>
</head>
<body>
<article>
<header>
<h1>grid box</h1>
</header>
<main>
<div class="grid">
<div class="grid-item _1">item1</div>
<div class="grid-item _2">item2</div>
<div class="grid-item _3">item3</div>
</div>
</main>
</article>
</body>
</html>