-
Notifications
You must be signed in to change notification settings - Fork 2
/
BS.html
435 lines (361 loc) · 19.8 KB
/
BS.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
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
<!-- BOOTSTRAP - Front-End Framework - by Beumsk -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!--Latest compiled and minified CSS-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
</head>
<body>
<div class="container"><!--provides a responsive fixed width container-->
<div class="border">.container</div>
</div>
<div class="container-fluid"><!--provides a full width container, spanning the entire width of the viewport-->
<div class="border">.container-fluid</div>
</div>
<div class="container">
<h4 class="border-top pt-5">Grid System</h4>
<div class="row">
<div class="col-12 col-sm-10 col-md-8 col-lg-6 col-xl-4">.col-12.col-sm-10.col-md-8.col-lg-6.col-xl-4</div><!-- xs < 576px / sm >= 576px / md >= 768px / lg >= 992px / xl > 1200px -->
</div>
<div class="row"><!--sum of row must always be equal to 12-->
<div class="col-sm-6">.col-sm-6</div>
<div class="col-sm-3">.col-sm-3</div>
<div class="col-sm-3">.col-sm-3</div>
</div>
<div class="row">
<div class="col-md-4 col-lg-6">.col-md-4.col-lg-6</div>
<div class="offset-md-4 col-md-4 offset-lg-0 col-lg-6">.col-md-4.offset-md-4.col-lg-6.offset-lg-0</div><!--offset creates a gap col before actual col; you can remove it with offset-0-->
</div>
<div class="row"><!-- BS4 is smart enough to divide multiple columns in egal parts without specifying their size -->
<div class="col">.col</div>
<div class="col">.col</div>
<div class="col">.col</div>
<div class="col">.col</div>
</div>
<div class="row"><!-- create a linebreak with the .w-100 class (add hidden/visible classes to manage the break according to screen size) -->
<div class="col">.col</div>
<div class="col">.col</div>
<div class="w-100">.w-100</div>
<div class="col">.col</div>
<div class="col">.col</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4">.col-sm-12.col-md-6.col-lg-4</div><!--multiple class to define col behavior on different devices-->
<div class="col-sm-12 col-md-6 col-lg-4">.col-sm-12.col-md-6.col-lg-4</div>
<div class="col-sm-12 col-md-6 col-lg-4">.col-sm-12.col-md-6.col-lg-4</div>
</div>
<div class="row justify-content-md-center"><!-- align horizontally the columns inside; also start, end, around and between -->
<div class="col-3">.col-3</div>
<div class="col-3">.col-3</div>
</div>
<div class="row align-items-center"><!-- align vertically the columns inside; also start & end -->
<div class="col-3">.col-3</div>
<div class="col-3">.col-3</div>
</div>
<div class="row">
<div class="col-3 align-self-start">.col-3.align-self-start</div><!-- align vertically the columns inside -->
<div class="col-3 align-self-center">.col-3.align-self-center</div>
<div class="col-3 align-self-end">.col-3.align-self-end</div>
</div>
<div class="row">
<div class="col-3 order-12">.col-3.order-12</div><!-- change item order -->
<div class="col-3">.col-3</div>
<div class="col-3 order-1">.col-3.order-1</div>
</div>
<h4 class="border-top pt-5">Spacing</h4>
<div class="p-2">.p-2</div><!-- padding; p-0 => p-5; in rem -->
<div class="m-2">.m-2</div><!-- margin; m-0 => m-5; m-auto -->
<div class="pt-2">.pt-2</div><!-- padding-top; pr, pb, pl -->
<div class="ml-2">.ml-2</div><!-- margin-left; mt, mr, mb -->
<div class="px-2">.px-2</div><!-- padding-left and right; py -->
<div class="my-2">.my-2</div><!-- margin-top and bottom; mx -->
<div class="mx-auto">.mx-auto</div><!-- margin auto -->
<h4 class="border-top pt-5">Display</h4>
<div class="clearfix">.clearfix</div><!-- clear floating effects; clear:both; -->
<div class="d-none">.d-none</div><!-- hidden on all -->
<div class="d-block">.d-block</div><!-- visible on all -->
<div class="d-none d-xl-block">.d-none.d-xl-block</div><!-- div only visible when Xlarge (>1200px) -->
<div class="d-none d-sm-block">.d-none.d-sm-block</div><!-- div only hidden when Xsmall (<576px) -->
<div class="visible">.visible</div><!-- visibility: visible -->
<div class="invisible">.invisible</div><!-- visibility: hidden -->
<h4 class="border-top pt-5">Media</h4>
<div class="media"><!-- help create repetitive contents: comments, tweets etc; possible to change alignement, order, nesting -->
<img class="mr-3" src="" alt="64x64"><!-- must be 64x64 image -->
<div class="media-body">
<h4 class="mt-0">Media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
<h4 class="border-top pt-5">Typography</h4>
<p class="lead">.lead</p><!-- stand out -->
<p class="small">.small</p><!-- smaller -->
<p class="text-left">.text-left</p><!-- also .text-right; .text-center; .text-justify; .text-nowrap -->
<p class="text-lowercase">.text-lowercase</p><!-- also .text-uppercase; .text-capitalize -->
<p class="text-monospace">.text-monospace</p><!-- monospace -->
<p class="font-weight-light">.font-weight-light</p><!-- font-weight-light -->
<h4 class="border-top pt-5">Text and Background Colors</h4>
<p class="text-muted">.text-muted</p><!--add color to text-->
<p class="bg-primary">.bg-primary</p><!--try those with .bg-primary etc to add color to background-->
<p class="text-secondary">.text-secondary</p>
<p class="text-success">.text-success</p>
<p class="bg-info">.bg-info</p>
<p class="text-warning">.text-warning</p>
<p class="bg-danger">.bg-danger</p>
<p class="text-dark bg-light">.text-dark.bg-light</p>
<p class="bg-dark text-light">.bg-dark.text-light</p>
<h4 class="border-top pt-5">Borders</h4>
<p class="border">.border</p><!-- adds borders; use -0 to remove borders -->
<p class="border-top">.border-top</p><!-- adds border top; also bottom left right -->
<p class="border-top">.border.border-top-0</p><!-- removes border bottom; also top right left -->
<p class="border border-primary">.border.border-primary</p> <!-- adds border of a certain color -->
<p class="rounded bg-dark text-light">.rounded</p><!-- adds border-radius; use -0 to remove border-radius -->
<p class="rounded-circle bg-dark text-light">.rounded-circle</p><!-- adds border-radius circle -->
<p class="rounded-pill bg-dark text-light">.rounded-pill</p><!-- adds pill-like radius -->
<h4 class="border-top pt-5">Shadows</h4>
<div class="shadow">.shadow</div><!-- adds shadow -->
<div class="shadow-sm">.shadow-sm</div><!-- small shadow; also shadow-lg -->
<div class="shadow-none">.shadow-none</div><!-- no shadow -->
<h4 class="border-top pt-5">Position</h4>
<div class="position-relative">.position-relative</div><!-- can also be absolute, fixed, static -->
<div class="fixed-top">.fixed-top</div><!-- fixed to top -->
<div class="sticky-top">.sticky-top</div><!-- position sticky for browser that support the feature -->
<h4 class="border-top pt-5">Lists</h4>
<ul><!--.list-unstyled; .list-inline-->
<li>Un</li>
<li>Deux</li>
<li>Trois</li>
</ul>
<ul class="list-group">
<li class="list-group-item active">Item 1</li><!--grouped list-->
<li class="list-group-item">Item 2</li>
<li class="list-group-item">Item 3</li>
<li class="list-group-item">Item 4</li>
</ul>
<h4 class="border-top pt-5">Description</h4>
<dl class="row">
<dt class="col-sm-3">Description lists</dt>
<dd class="col-sm-9">A description list is perfect for defining terms.</dd>
<dt class="col-sm-3 text-truncate">Truncated term is truncated</dt>
<dd class="col-sm-9 text-truncate">Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
</dl>
<h4 class="border-top pt-5">Blockquote</h4>
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>
<h4 class="border-top pt-5">Card</h4>
<div class="card">
<img src="img/html.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
<h4 class="border-top pt-5">Progress bar</h4>
<div class="container">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%;"></div><!--style is most important to show-->
</div>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%;"></div>
</div>
<div class="progress progress-striped">
<div class="progress-bar bg-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;"></div>
</div>
<div class="progress progress-striped">
<div class="progress-bar bg-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%;"></div>
</div>
</div>
<h4 class="border-top pt-5">Table</h4>
<div class="table-responsive"><!--create a scroll bar when width is too short for content-->
<table class="table"><!-- .table-striped .table-bordered .table-borderless .table-hover .table.responsive .table-dark .table-sm -->
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div>
<h4 class="border-top pt-5">Images</h4>
<img src="img/html.jpg" alt="" class="rounded" width="33%">
<img src="img/html.jpg" alt="" class="rounded-circle" width="33%">
<img src="img/html.jpg" alt="" class="img-thumbnail" width="33%">
<img src="img/html.jpg" alt="" class="img-fluid center-block" width="100%"><!--center the block-->
<h4 class="border-top pt-5">Images with caption in thumbnail</h4>
<div class="thumbnail">
<img class="img-fluid img" src="http://wallpapercave.com/wp/EX7yydn.jpg">
<div class="caption text-center">Batman: The animated series - 1992</div>
</div>
<h4 class="border-top pt-5">Embed responsive</h4>
<div class="embed-responsive embed-responsive-16by9"><!-- ratio can be 1by1, 4by3 or 21by9 -->
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/2-w1vZX_K_c"></iframe><!--video responsive-->
</div>
<h4 class="border-top pt-5">Alerts</h4>
<div class="alert alert-success"><strong>Success!</strong> Indicates a successful or positive action.</div>
<div class="alert alert-info"><strong>Info!</strong> Indicates a neutral informative change or action.</div>
<h4 class="border-top pt-5">Closing Alert</h4>
<div class="alert alert-warning">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a><!--<a> tag adds closing button-->
<strong>Warning!</strong> Indicates a warning that might need attention.
</div>
<h4 class="border-top pt-5">Animated Alert</h4>
<div class="alert alert-danger fade in">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Danger!</strong> Indicates a dangerous or potentially negative action.
</div>
<h4 class="border-top pt-5">Buttons</h4>
<button type="button" class="btn btn-primary">.btn.btn-primary</button>
<button type="button" class="btn btn-secondary">.btn.btn-primary</button>
<button type="button" class="btn btn-success">.btn.btn-success</button><!-- danger, warning, info, light, dark -->
<button type="button" class="btn btn-outline-warning">.btn.btn-outline-warning</button><!-- and all other color classes -->
<button type="button" class="btn btn-link">btn.btn-link</button>
<a href="#" class="btn btn-danger" role="button">.btn.btn-danger</a>
<input type="button" class="btn btn-info" value=".btn.btn-info"><!-- also submit type -->
<button type="button" class="btn btn-primary btn-lg">.btn.btn-primary.btn-lg</button><!-- also btn-sm -->
<button type="button" class="btn btn-primary active">.btn.btn-primary.active</button><!--appear pressed-->
<button type="button" class="btn btn-primary disabled">.btn.btn-primary.disabled</button><!--not working-->
<button type="button" class="btn btn-primary btn-block">.btn.btn-primary.btn-block</button><!--takes all width-->
<h4 class="border-top pt-5">Button Groups</h4>
<div class="btn-group btn-group-lg" role="group" aria-label="..."><!-- also btn-group--sm -->
<button type="button" class="btn btn-primary">button</button>
<button type="button" class="btn btn-primary">grouped</button>
<button type="button" class="btn btn-primary">horizontally</button>
</div>
<div class="btn-group-vertical" role="group" aria-label="...">
<button type="button" class="btn btn-primary">button</button>
<button type="button" class="btn btn-primary">grouped</button>
<button type="button" class="btn btn-primary">vertically</button>
</div>
<div class="btn-group" role="group" aria-label="...">
<button type="button" class="btn btn-secondary">1</button>
<button type="button" class="btn btn-secondary">2</button>
<div class="btn-group" role="group">
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown
</button>
<div class="dropdown-menu" aria-labelledby="btnGroupDrop1">
<a class="dropdown-item" href="#">Dropdown link</a>
<a class="dropdown-item" href="#">Dropdown link</a>
</div>
</div>
</div>
<h4 class="border-top pt-5">Badges</h4>
<a href="#">News <span class="badge">5</span></a>
<a href="#">Comments <span class="badge">10</span></a>
<a href="#">Updates <span class="badge">2</span></a>
<button type="button" class="btn btn-primary">Primary <span class="badge badge-light">7</span></button>
<span class="badge badge-primary">Primary</span><!-- and other colors -->
<span class="badge badge-pill badge-secondary">Secondary</span>
<a href="#" class="badge badge-dark">Dark</a>
<h4 class="border-top pt-5">Modal Window</h4>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">Launch demo modal</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Animi, cupiditate!
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<h4 class="border-top pt-5">Tabs</h4>
<ul class="nav nav-tabs nav-fill" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae, cupiditate!</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Facilis, ullam?</div>
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Amet, iste!</div>
</div>
<h4 class="border-top pt-5">Carousel with indicator</h4>
<div id="carousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1"></li>
<li data-target="#carousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active"><img class="w-100 d-block" alt="" src="img/html.jpg"></div>
<div class="carousel-item"><img alt="" class="w-100 d-block" src="img/html.jpg"></div>
<div class="carousel-item"><img alt="" class="w-100 d-block" src="img/html.jpg"></div>
</div>
<a class="carousel-control-prev" href="#carousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<h4 class="border-top pt-5">Navbar</h4>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
</ul>
</div>
</nav>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</body>
</html>