-
Notifications
You must be signed in to change notification settings - Fork 0
/
cssgrid1.html
68 lines (58 loc) · 1.56 KB
/
cssgrid1.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
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS Grid #01</title>
<style>
/* https://caniuse.com/#feat=css-grid */
html,
body {
margin: 20px;
height: calc(100% - 40px);
background-color: lightgray;
}
div {
display: flex;
align-items: center;
justify-content: center;
font-size: 30px;
border: solid 5px dodgerblue;
background: #fff;
}
body {
display: grid;
grid-template-columns: 50% 50%;
grid-template-columns: repeat(4,8.33% 8.33% 8.33%);
grid-template-columns: repeat(11,100px)100px;
grid-template-columns: 300px 30% 1fr;
grid-template-columns: 3fr 6fr 3fr;
grid-template-rows: 100px 1fr;
grid-template-rows: 100px auto;
}
.d8 {
grid-column-start: 2;
grid-column-end: 4;
grid-column-end: span 2;
grid-row-start: 3;
grid-row-end: 5 ;
}
.d10 {
z-index: 10; /* Profundidade dos elementos*/
}
</style>
</head>
<body>
<div class="d1">1</div>
<div class="d2">2</div>
<div class="d3">3</div>
<div class="d4">4</div>
<div class="d5">5</div>
<div class="d6">6</div>
<div class="d7">7</div>
<div class="d8">8</div>
<div class="d9">9</div>
<div class="d10">10</div>
<div class="d11">11</div>
<div class="d12">12</div>
</body>
</html>