-
Notifications
You must be signed in to change notification settings - Fork 0
/
tut41.html
37 lines (35 loc) · 1.01 KB
/
tut41.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS grid</title>
<style>
.grid{
display: grid;
grid-template-rows: 1fr 1fr 4fr;
/* in gar we given the to row is used to mentions the gap between them which we are not provide the value */
grid-auto-rows: 2fr;
}
.box{
background-color: gray;
border: 2px solid black;
}
</style>
</head>
<body>
<div class="grid">
<div class="box">box-1</div>
<div class="box">box-2</div>
<div class="box">box-3</div>
<div class="box">box-4</div>
<div class="box">box-5</div>
<div class="box">box-6</div>
<div class="box">box-7</div>
<div class="box">box-8</div>
<div class="box">box-9</div>
<div class="box">box-10</div>
</div>
</body>
</html>