blob: 0fe8527c01c2c65166d852d5d25880f9c7449e9a (
plain)
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
|
<!doctype html>
<style type='text/css'>
/* Implicit gridlines created from explicit grid areas. */
.wrapperA {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: minmax(100px, auto);
grid-template-areas:
"header header header"
"main main main";
}
.header {
grid-column: header-start / header-end;
grid-row: header-start / header-end;
}
.main {
grid-area: main;
}
/* Implicit grid areas created from explicit gridlines */
.wrapperB {
display: grid;
grid-template-columns: [main-start] 1fr [content-start] 1fr [content-end main-end];
grid-template-rows: [main-start] 100px [content-start] 100px [content-end main-end];
}
.contentArea {
grid-column: content-start / content-end;
grid-row: content-start / content-end;
}
.wrapperC {
display: grid;
grid-template-columns: [a-start b-end] 1fr [c];
}
.a {
grid-column: a-start / a-end;
}
.b {
grid-column: b-start / b-end;
}
</style>
<div>
<div class="wrapperA">
<div class="header">Header</div>
<div class="main">Content</div>
</div>
<div class="wrapperB">
<div class="contentArea">Implicit area named "content".</div>
</div>
<div class="wrapperC">
<div class="a">A.</div>
<div class="b">B.</div>
</div>
</div>
|