forked from mdn/css-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintro-grid-example.html
74 lines (63 loc) · 1.61 KB
/
intro-grid-example.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
69
70
71
72
73
74
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Grid and writing modes example</title>
<link rel="stylesheet" href="../css-cookbook/styles.css">
<style>
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: minmax(100px, auto);
border: 2px solid rgb(96, 139, 168);
border-radius: 5px;
}
.grid > * {
border-radius: 5px;
border: 2px solid rgba(96, 139, 168, .4);
background-color: rgba(96, 139, 168, .2);
padding: 10px;
}
.grid :nth-child(1) {
align-self: start;
}
.grid :nth-child(2) {
justify-self: end;
}
</style>
<style class="editable">
.grid {
writing-mode: vertical-rl;
inline-size: 400px;
}
</style>
</head>
<body>
<section class="preview">
<div class="grid">
<div>One</div>
<div>Two</div>
<div>Three</div>
<div>Four</div>
</div>
</section>
<textarea class="playable playable-css" style="height: 170px;">
.grid {
writing-mode: vertical-rl;
inline-size: 400px;
}
</textarea>
<textarea class="playable playable-html" style="height: 140px;">
<div class="grid">
<div>One</div>
<div>Two</div>
<div>Three</div>
<div>Four</div>
</div>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
</body>
<script src="../css-cookbook/playable.js"></script>
</html>