-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrid_css.html
More file actions
52 lines (45 loc) · 1.01 KB
/
grid_css.html
File metadata and controls
52 lines (45 loc) · 1.01 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
<!DOCTYPE html>
<html>
<head>
<title>CSS Grid</title>
<style>
.container{
display: grid;
width: 500px;
height: 400px;
margin: 100px auto 0;
/* background: #e3e3e3; */
grid-template-columns: repeat(4, auto);
grid-gap: 1em;
}
.item{
border: 1px solid #999;
}
.item:first-child {
background: red;
/* grid-row-start: 1;
grid-row-end: 2; */
grid-row: 2/3;
/* grid-column-start: 4;
grid-column-end: 5; */
grid-column: 1/4;
}
.item:last-child {
background: green;
grid-column: 2/5;
}
</style>
</head>
<body>
<div class="container">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item">4</div>
<div class="item">5</div>
<div class="item">6</div>
<div class="item">7</div>
<div class="item">8</div>
</div>
</body>
</html>