-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathcontent-distribution-changes.html
150 lines (139 loc) · 5.32 KB
/
content-distribution-changes.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html>
<head>
<link href="css/grid.css" rel="stylesheet">
<style>
.grid {
-ms-grid-auto-columns: 20px;
grid-auto-columns: 20px;
-ms-grid-auto-rows: 40px;
grid-auto-rows: 40px;
-ms-grid-template-areas: "a a b"
"c d b";
grid-template-areas: "a a b"
"c d b";
width: 300px;
height: 200px;
}
.containerGrid {
display: -ms-grid;
display: grid;
-ms-grid-template-areas: "c1 c1 c1"
"c2 c3 c3";
grid-template-areas: "c1 c1 c1"
"c2 c3 c3";
grid-auto-columns: auto;
grid-auto-rows: auto;
}
.container {
margin: 10px;
}
.c1 {
-ms-grid-area: c1;
grid-area: c1;
}
.c2 {
-ms-grid-area: c2;
grid-area: c2;
}
.c3 {
-ms-grid-area: c3;
grid-area: c3;
}
.a {
-ms-grid-area: a;
grid-area: a;
}
.b {
-ms-grid-area: b;
grid-area: b;
}
.c {
-ms-grid-area: c;
grid-area: c;
}
.d {
-ms-grid-area: d;
grid-area: d;
}
.stretchedColumnGrid {
-ms-grid-auto-columns: auto;
grid-auto-columns: auto;
}
.stretchedRowGrid {
-ms-grid-auto-rows: auto;
grid-auto-rows: auto;
}
.spaceBetween {
justify-content: space-between;
align-content: space-between;
}
.spaceAround {
justify-content: space-around;
align-content: space-around;
}
.spaceEvenly {
justify-content: space-evenly;
align-content: space-evenly;
}
.stretch {
justify-content: stretch;
align-content: stretch;
}
</style>
<script>
function change_justify_position(obj) {
var grid = document.getElementById("grid");
if (obj.value == "stretch")
grid.classList.add("stretchedColumnGrid");
else
grid.classList.remove("stretchedColumnGrid");
grid.style.justifyContent=obj.value;
}
function change_align_position(obj) {
var grid = document.getElementById("grid");
if (obj.value == "stretch")
grid.classList.add("stretchedRowGrid");
else
grid.classList.remove("stretchedRowGrid");
grid.style.alignContent=obj.value;
}
</script>
</head>
<body>
<div class="containerGrid">
<div class="container c1">
<div>
<label><b>justify-content:</b></label>
</div>
<div>
<label><input type="radio" name="justify-content" onclick="change_justify_position(this)" value="space-around">space-around</label>
<label><input type="radio" name="justify-content" onclick="change_justify_position(this)" value="space-between">space-between</label>
<label><input type="radio" name="justify-content" onclick="change_justify_position(this)" value="space-evenly">space-evenly</label>
<label><input type="radio" name="justify-content" onclick="change_justify_position(this)" value="stretch">stretch</label>
<label><input type="radio" name="justify-content" onclick="change_justify_position(this)" value="start">start</label>
<label><input type="radio" name="justify-content" onclick="change_justify_position(this)" value="end">end</label>
<label><input type="radio" name="justify-content" onclick="change_justify_position(this)" value="center">center</label>
</div>
</div>
<div class="container c2">
<div><label><b>align-content:</b></label></div>
<div><label><input type="radio" name="align-content" onclick="change_align_position(this)" value="space-around">space-around</label></div>
<div><label><input type="radio" name="align-content" onclick="change_align_position(this)" value="space-between">space-between</label></div>
<div><label><input type="radio" name="align-content" onclick="change_align_position(this)" value="space-evenly">space-evenly</label></div>
<div><label><input type="radio" name="align-content" onclick="change_align_position(this)" value="stretch">stretch</label></div>
<div><label><input type="radio" name="align-content" onclick="change_align_position(this)" value="start">start</label></div>
<div><label><input type="radio" name="align-content" onclick="change_align_position(this)" value="end">end</label></div>
<div><label><input type="radio" name="align-content" onclick="change_align_position(this)" value="center">center</label></div>
</div>
<div class="container c3">
<div id="grid" class="grid">
<div class="a"></div>
<div class="b"></div>
<div class="c"></div>
<div class="d"></div>
</div>
</div>
</div>
</body>
</html>