/
week7-3-1.html
55 lines (48 loc) · 1.08 KB
/
week7-3-1.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>week7-3-1</title>
<style type="text/css">
#container{
display: grid;
background-color: skyblue;
padding: 10px;
/*grid-template-columns: 100px 100px 100px;
grid-template-rows: 50px 50px 50px;*/
/*grid-template-columns: repeat(3, 100px);
grid-template-rows: repeat(3, 50px);*/
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, 1fr);
height: 50vh;
/*grid-row-gap: 5px 10px;*/
}
#container>div{border: 1px solid; background-color: turquoise;}
#container>div:nth-child(2){
grid-column: 2 / 4;
}
#container>div:nth-child(4){
grid-row: 2 / 4;
grid-column: 1/2;
}
#container>div:nth-child(7){
grid-column: 2/3;
grid-row: 3/4;
}
</style>
</head>
<body>
<div id="container">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
</div>
</body>
</html>