forked from vincent3569/zpBootstrap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap_grid_system.htm
477 lines (470 loc) · 19.1 KB
/
bootstrap_grid_system.htm
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<script type="text/javascript" src="../../zp-core/js/jquery.js"></script>
<title>Bootstrap Grid System</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/zpBootstrap.css" type="text/css" media="screen" />
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/zpBootstrap.js"></script>
</head>
<body>
<nav id="menu" class="navbar navbar-inverse navbar-static-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#" title="Home">Bootstrap Grid System</a>
</div>
</div>
</nav><!--/.navbar -->
<!-- The scroll to top feature -->
<div class="scroll-to-top">
<span class="glyphicon glyphicon-chevron-up"></span>
</div>
<div id="main" class="container">
<div class="row">
<div class="col-sm-12">
<div class="post margin-bottom-double clearfix">
<h2>Menu</h2>
<div class="docs-section">
<p><a href="#grid-options">Options de la grille</a></p>
<p><a href="#grid-example-basic">Exemple : Grille Desktop</a></p>
<p><a href="#grid-example-mixed-complete">Exemple: Grille Mobile, Tablet, Desktop</a></p>
<p><a href="#grid-example-wrapping">Exemple: Wrapping des colonnes</a></p>
<p><a href="#grid-offsetting">Décallage des colonnes (offset)</a></p>
<p><a href="#grid-column-ordering">Ordre des colonnes (push-pull)</a></p>
<p><a href="#grid-nesting">Colonnes encapsulées (nested)</a></p>
<p><a href="#grid-responsive-resets">Reset des colonnes (column clearing, et offset/push/pull reset)</a></p>
<p><a href="#responsive-utilities">Utilitaires Responsive</a></p>
<p><a href="#responsive-utilities-tests">Cas de test</a></p>
</div>
<div id="grid-options" class="docs-section">
<h2>Options de la grille</h2>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th> </th>
<th>Extra small devices<br>
<small>Phones (<768px)</small></th>
<th>Small devices<br>
<small>Tablets (≥768px)</small></th>
<th>Medium devices<br>
<small>Desktops (≥992px)</small></th>
</tr>
</thead>
<tbody>
<tr>
<th class="text-nowrap" scope="row">Comportement de la grille</th>
<td>Tout le temps horizontal</td>
<td colspan="2">Empillé au départ, horizontal au-delà des breakpoints</td>
</tr>
<tr>
<th class="text-nowrap" scope="row">Largeur du container</th>
<td>Aucune (auto)</td>
<td>750px</td>
<td>970px</td>
</tr>
<tr>
<th class="text-nowrap" scope="row">Préfixe de class</th>
<td><code>.col-xs-</code></td>
<td><code>.col-sm-</code></td>
<td><code>.col-md-</code></td>
</tr>
<tr>
<th class="text-nowrap" scope="row"># of columns</th>
<td colspan="3">12</td>
</tr>
<tr>
<th class="text-nowrap" scope="row">Largeur de la colonne</th>
<td class="text-muted">Auto</td>
<td>~62px</td>
<td>~81px</td>
</tr>
<tr>
<th class="text-nowrap" scope="row">Largeur de la goutière</th>
<td colspan="3">30px (15px de chaque coté de la colonne)</td>
</tr>
<tr>
<th class="text-nowrap" scope="row">Nestable</th>
<td colspan="3">Yes</td>
</tr>
<tr>
<th class="text-nowrap" scope="row">Offsets</th>
<td colspan="3">Yes</td>
</tr>
<tr>
<th class="text-nowrap" scope="row">Column ordering</th>
<td colspan="3">Yes</td>
</tr>
</tbody>
</table>
</div>
<div id="grid-example-basic" class="docs-section">
<h2>Exemple : Grille Desktop</h2>
<div class="row show-grid">
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
<div class="col-md-1">.col-md-1</div>
</div>
<div class="row show-grid">
<div class="col-md-2">.col-md-2</div>
<div class="col-md-2">.col-md-2</div>
<div class="col-md-2">.col-md-2</div>
<div class="col-md-2">.col-md-2</div>
<div class="col-md-2">.col-md-2</div>
<div class="col-md-2">.col-md-2</div>
</div>
<div class="row show-grid">
<div class="col-md-3">.col-md-3</div>
<div class="col-md-3">.col-md-3</div>
<div class="col-md-3">.col-md-3</div>
<div class="col-md-3">.col-md-3</div>
</div>
<div class="row show-grid">
<div class="col-md-4">.col-md-4</div>
<div class="col-md-4">.col-md-4</div>
<div class="col-md-4">.col-md-4</div>
</div>
<div class="row show-grid">
<div class="col-md-6">.col-md-6</div>
<div class="col-md-6">.col-md-6</div>
</div>
<div class="row show-grid">
<div class="col-md-8">.col-md-8</div>
<div class="col-md-4">.col-md-4</div>
</div>
</div>
<div id="grid-example-mixed-complete" class="docs-section">
<h2>Exemple: Grille Mobile, Tablet, Desktop</h2>
<div class="row show-grid">
<div class="col-sm-6 col-md-8">(.col-xs-12 inutile car valeur par défaut) .col-sm-6 .col-md-8</div>
<div class="col-xs-6 col-md-4">.col-xs-6 (.col-sm-6 inutile si même comportement que xs) .col-md-4</div>
</div>
<div class="row show-grid">
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4 (.col-md-4 inutile si même comportement que sm)</div>
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
<div class="clearfix visible-xs-block"> </div>
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
</div>
</div>
<div id="grid-example-wrapping" class="docs-section">
<h2>Exemple: Wrapping des colonnes</h2>
<div class="row show-grid">
<div class="col-xs-9">.col-xs-9</div>
<div class="col-xs-4">.col-xs-4<br>
Comm 9 + 4 = 13 > 12, Cette division de 4 colonnes est décalée sur une nouvelle ligne en tant qu'unité contiguë.</div>
<div class="col-xs-6">.col-xs-6<br>
Les colonnes subséquentes continuent le long de la nouvelle ligne.</div>
</div>
</div>
<div id="grid-offsetting" class="docs-section">
<h2>Décallage des colonnes (offset)</h2>
<div class="row show-grid">
<div class="col-md-4">.col-md-4</div>
<div class="col-md-offset-4 col-md-4">.col-md-offset-4
.col-md-4</div>
</div>
<div class="row show-grid">
<div class="col-md-offset-3 col-md-3">.col-md-offset-3 .col-md-3</div>
<div class="col-md-offset-3 col-md-3">.col-md-offset-3 .col-md-3</div>
</div>
<div class="row show-grid">
<div class="col-md-offset-3 col-md-6">.col-md-offset-3 .col-md-6</div>
</div>
</div>
<div id="grid-column-ordering" class="docs-section">
<h2>Ordre des colonnes (push-pull)</h2>
<div class="row show-grid">
<div class="col-md-push-3 col-md-9">.col-md-push-3 .col-md-9</div>
<div class="col-md-pull-9 col-md-3">.col-md-pull-9 .col-md-3</div>
</div>
</div>
<div id="grid-nesting" class="docs-section">
<h2>Colonnes encapsulées (nested)</h2>
<div class="row show-grid">
<div class="col-md-8">niv1 .col-md-8
<div class="row show-grid">
<div class="col-xs-8 col-sm-6">niv2 .col-xs-8 .col-sm-6</div>
<div class="col-xs-4 col-sm-6">niv2 .col-xs-4 .col-sm-6</div>
</div>
</div>
<div class="col-md-4">niv1 .col-md-4</div>
</div>
</div>
<div id="grid-responsive-resets" class="docs-section">
<h2>Reset des colonnes (column clearing, et offset/push/pull reset)</h2>
<div class="row show-grid">
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3<br>
Hauteur de colonne trop grand par rapport à la hauteur des colonnes suivantes.<br>
Redimenssionnez l'écran, ou regardez-le sur votre smartphone pour voir l'exemple.</div>
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3 (sans reset)</div>
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
</div>
<div class="row show-grid">
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3<br>
Redimenssionnez l'écran, ou regardez-le sur votre smartphone pour voir l'exemple.</div>
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
<div class="clearfix visible-xs-block"> </div>
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3 (avec colonne reset)</div>
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
</div>
<div class="row show-grid">
<div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div>
<div class="col-sm-offset-2 col-sm-5 col-md-6">.col-sm-offset-2 .col-sm-5 .col-md-6 (sans offset reset)</div>
</div>
<div class="row show-grid">
<div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div>
<div class="col-sm-offset-2 col-sm-5 col-md-offset-0 col-md-6">.col-sm-offset-2 .col-sm-5 .col-md-offset-0 .col-md-6 (avec offset reset)</div>
</div>
</div>
<div id="responsive-utilities" class="docs-section">
<h2>Utilitaires Responsive</h2>
<div class="table-responsive">
<table class="table table-bordered table-striped responsive-utilities">
<thead>
<tr>
<th> </th>
<th>Extra small devices<br>
<small>Phones (<768px)</small></th>
<th>Small devices <small>Tablets (≥768px)</small></th>
<th>Medium devices <small>Desktops (≥992px)</small></th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row"><code>.visible-xs-*</code></th>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
<td class="is-hidden">Hidden</td>
</tr>
<tr>
<th scope="row"><code>.visible-sm-*</code></th>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
</tr>
<tr>
<th scope="row"><code>.visible-md-*</code></th>
<td class="is-hidden">Hidden</td>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
</tr>
<tr>
<th scope="row"><code>.visible-lg-*</code></th>
<td class="is-hidden">Hidden</td>
<td class="is-hidden">Hidden</td>
<td class="is-hidden">Hidden</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="row"><code>.hidden-xs</code></th>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
<td class="is-visible">Visible</td>
</tr>
<tr>
<th scope="row"><code>.hidden-sm</code></th>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
</tr>
<tr>
<th scope="row"><code>.hidden-md</code></th>
<td class="is-visible">Visible</td>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
</tr>
<tr>
<th scope="row"><code>.hidden-lg</code></th>
<td class="is-visible">Visible</td>
<td class="is-visible">Visible</td>
<td class="is-visible">Visible</td>
</tr>
</tbody>
</table>
</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Group of classes</th>
<th>CSS <code>display</code></th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row"><code>.visible-*-block</code></th>
<td><code>display: block;</code></td>
</tr>
<tr>
<th scope="row"><code>.visible-*-inline</code></th>
<td><code>display: inline;</code></td>
</tr>
<tr>
<th scope="row"><code>.visible-*-inline-block</code></th>
<td><code>display: inline-block;</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="responsive-utilities-tests" class="docs-section">
<h2>Cas de test</h2>
<h3 id="visible-on">Visible on...</h3>
<div class="row responsive-utilities-test visible-on">
<div class="col-xs-4">
<span class="hidden-xs">Extra small</span>
<span class="visible-xs-block">✔ Visible on x-small</span>
</div>
<div class="col-xs-4">
<span class="hidden-sm">Small</span>
<span class="visible-sm-block">✔ Visible on small</span>
</div>
<div class="col-xs-4">
<span class="hidden-md">Medium</span>
<span class="visible-md-block">✔ Visible on medium</span>
</div>
</div>
<div class="row responsive-utilities-test visible-on">
<div class="col-xs-8">
<span class="hidden-xs hidden-sm">Extra small and small</span>
<span class="visible-xs-block visible-sm-block">✔ Visible on x-small and small</span>
</div>
</div>
<div class="row responsive-utilities-test visible-on">
<div class="col-xs-offset-4 col-xs-8">
<span class="hidden-sm hidden-md">Small and medium</span>
<span class="visible-sm-block visible-md-block">✔ Visible on small and medium</span>
</div>
</div>
<div class="row responsive-utilities-test visible-on">
<div class="col-xs-4">
<span class="hidden-xs hidden-md">Extra small and medium</span>
<span class="visible-xs-block visible-md-block">✔ Visible on x-small and medium</span>
</div>
<div class="col-xs-offset-4 col-xs-4">
<span class="hidden-xs hidden-md">Small and medium</span>
<span class="visible-xs-block visible-md-block">✔ Visible on x-small and medium</span>
</div>
</div>
<h3 id="hidden-on">Hidden on...</h3>
<div class="row responsive-utilities-test hidden-on">
<div class="col-xs-4">
<span class="hidden-xs">Extra small</span>
<span class="visible-xs-block">✔ Hidden on x-small</span>
</div>
<div class="col-xs-4">
<span class="hidden-sm">Small</span>
<span class="visible-sm-block">✔ Hidden on small</span>
</div>
<div class="col-xs-4">
<span class="hidden-md">Medium</span>
<span class="visible-md-block">✔ Hidden on medium</span>
</div>
</div>
<div class="row responsive-utilities-test hidden-on">
<div class="col-xs-8">
<span class="hidden-xs hidden-sm">Extra small and small</span>
<span class="visible-xs-block visible-sm-block">✔ Hidden on x-small and small</span>
</div>
</div>
<div class="row responsive-utilities-test hidden-on">
<div class="col-xs-offset-4 col-xs-8">
<span class="hidden-sm hidden-md">Small and medium</span>
<span class="visible-sm-block visible-md-block">✔ Hidden on small and medium</span>
</div>
</div>
<div class="row responsive-utilities-test hidden-on">
<div class="col-xs-4">
<span class="hidden-xs hidden-md">Extra small and medium</span>
<span class="visible-xs-block visible-md-block">✔ Hidden on x-small and medium</span>
</div>
<div class="col-xs-offset-4 col-xs-4">
<span class="hidden-xs hidden-md">Small and medium</span>
<span class="visible-xs-block visible-md-block">✔ Hidden on small and medium</span>
</div>
</div>
</div>
</div>
<style>
.show-grid {
margin-bottom: 15px;
}
.show-grid [class^="col-"] {
background-color: rgba(86, 61, 124, 0.15);
border: 1px solid rgba(86, 61, 124, 0.2);
border-radius: 3px;
padding-bottom: 10px;
padding-top: 10px;
}
.docs-section {
margin-bottom: 40px;
}
.responsive-utilities td {
text-align: center;
}
.responsive-utilities td.is-visible {
background-color: #dff0d8 !important;
color: #468847;
}
.responsive-utilities td.is-hidden {
/*background-color: #f9f9f9 !important;*/
color: #ccc;
}
.responsive-utilities-test {
margin-top: 5px;
}
.responsive-utilities-test [class^="col-"] {
margin-bottom: 10px;
}
.responsive-utilities-test span {
border-radius: 4px;
display: block;
font-size: 14px;
font-weight: 700;
line-height: 1.1;
padding: 15px 10px;
text-align: center;
}
.hidden-on [class^="col-"] [class^="hidden-"], .visible-on [class^="col-"] [class^="hidden-"] {
border: 1px solid #ddd;
color: #999;
}
.hidden-on [class^="col-"] [class^="visible-"], .visible-on [class^="col-"] [class^="visible-"] {
background-color: #dff0d8;
border: 1px solid #d6e9c6;
color: #468847;
}
</style>
</div><!--/.post -->
</div>
</div>
</div><!-- /.container main -->
<footer id="footer" class="footer">
<div class="container">
<div>
Powered by <a href="https://www.zenphoto.org/" title="A simpler web album"><span id="zen-part">zen</span><span id="photo-part">PHOTO</span></a> & <a href="https://getbootstrap.com/docs/3.4/" target="_blank" title="Bootstrap">Bootstrap</a>
</div>
</div>
</footer>
</body>
</html>