-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
272 lines (263 loc) · 5.19 KB
/
index.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>flex布局</title>
<style>
body{
background-color: #874C92;
display: flex;
flex-wrap: wrap;
}
.box{
background-color: #fff;
border-radius: 10px;
width:104px;
height: 104px;
padding:4px;
margin:10px;
}
.item{
background-color: #000;
width:24px;
height:24px;
border-radius: 24px;
margin:4px;
}
.p100{
display: flex;
}
.p101{
display: flex;
justify-content: center;
}
.p102{
display: flex;
justify-content: flex-end;
}
.p110{
display: flex;
align-items: center;
}
.p111 {
display: flex;
justify-content: center;
align-items: center;
}
.p121 {
display: flex;
justify-content: center;
align-items: flex-end;
}
.p122 {
display: flex;
justify-content: flex-end;
align-items: flex-end;
}
.p2_00_02 {
display: flex;
justify-content: space-between;
}
.p2_00_20 {
display: flex;
justify-content: space-between;
flex-direction: column;
}
.p2_01_21 {
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: center;
}
.p2_02_22 {
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: flex-end;
}
.p2_00_11{
display: flex;
}
.p2_00_11 .item:nth-child(2){
align-self: center;
}
.p2_00_22 {
display: flex;
justify-content: space-between;
}
.p2_00_22 .item:nth-child(2) {
align-self: flex-end;
}
.p3_00_11_22 {
display: flex;
}
.p3_00_11_22 .item:nth-child(2) {
align-self: center;
}
.p3_00_11_22 .item:nth-child(3) {
align-self: flex-end;
}
.p4_00_01_02_22 {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
align-content: space-between;
}
.p4_00_02_20_22 {
display: flex;
flex-wrap: wrap;
align-content: space-between;
}
.p4_00_02_20_22 .column {
flex-basis: 100%;
display: flex;
justify-content: space-between;
}
.p6_1 {
display: flex;
flex-wrap: wrap;
align-content: space-between;
}
.p6_2 {
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-content: space-between;
}
.p6_3 {
display: flex;
flex-wrap: wrap;
}
.p6_3 .row{
flex-basis: 100%;
display:flex;
}
.p6_3 .row:nth-child(2){
justify-content: center;
}
.p6_3 .row:nth-child(3){
justify-content: space-between;
}
.p9 {
display: flex;
flex-wrap: wrap;
}
</style>
</head>
<body>
<h1><a href="http://www.ruanyifeng.com/blog/2015/07/flex-examples.html">flex布局教程</a></h1>
<!-- 1个项目 -->
<div class="box p100">
<span class="item"></span>
</div>
<div class="box p101">
<span class="item"></span>
</div>
<div class="box p102">
<span class="item"></span>
</div>
<div class="box p110">
<span class="item"></span>
</div>
<div class="box p111">
<span class="item"></span>
</div>
<div class="box p121">
<span class="item"></span>
</div>
<div class="box p122">
<span class="item"></span>
</div>
<!-- 2个项目 -->
<div class="box p2_00_02">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="box p2_00_20">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="box p2_01_21">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="box p2_02_22">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="box p2_00_11">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="box p2_00_22">
<span class="item"></span>
<span class="item"></span>
</div>
<!-- 3个项目 -->
<div class="box p3_00_11_22">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
<!-- 4个项目 -->
<div class="box p4_00_01_02_22">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
<div class="box p4_00_02_20_22">
<div class="column">
<span class="item"></span>
<span class="item"></span>
</div>
<div class="column">
<span class="item"></span>
<span class="item"></span>
</div>
</div>
<!-- 6个项目 -->
<div class="box p6_1">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
<div class="box p6_2">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
<div class="box p6_3">
<div class="row">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
<div class="row">
<span class="item"></span>
</div>
<div class="row">
<span class="item"></span>
<span class="item"></span>
</div>
</div>
<!-- 9个项目 -->
<div class="box p9">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
</body>
</html>