x
1
2
<html>
3
<head>
4
<style>
5
.grid-container
6
{
7
display: grid;
8
grid-template-columns:auto auto auto;
9
grid-template-rows:none none none;
10
background-color: #2196F3;
11
padding: 10px;
12
}
13
14
.item
15
{
16
background-color: rgba(255, 255, 255, 0.8);
17
border: 1px solid rgba(0, 0, 0, 0.8);
18
padding: 20px;
19
font-size: 30px;
20
text-align: center;
21
}
22
23
.one
24
{
25
grid-column-start:auto;
26
grid-column-end:auto;
27
}
28
</style>
29
</head>
30
<body>
31
32
<div class="grid-container">
33
<div class="item one">1</div>
34
<div class="item">2</div>
35
<div class="item">3</div>
36
<div class="item">4</div>
37
<div class="item">5</div>
38
<div class="item">6</div>
39
<div class="item">7</div>
40
<div class="item">8</div>
41
<div class="item">9</div>
42
</div>
43
44
</body>
45
</html>