-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap-guides.html
424 lines (385 loc) · 16.5 KB
/
bootstrap-guides.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bootstrap</title>
<link rel="stylesheet" href="./src/main.css">
<style>
[class*="con"]{
border: 1px solid white;
}
[class*="col"] {
padding: 1rem;
border: 1px solid white;
text-align: center;
}
h1 {
margin: 20px 10px;
}
body {
font-family: "fira code";
}
</style>
</head>
<body>
<h1>Grid containers</h1>
<div class="container-fluid bg-info">container-fluid</div>
<div class="container">container</div>
<div class="container-sm bg-warning">container-sm => </div>
<div class="container-md bg-secondary">container-md => </div>
<div class="container-lg bg-danger">container-lg => </div>
<div class="container-xl bg-light">container-xl => </div>
<div class="container-xxl bg-success">container-xxl => </div>
<h1>Rows</h1>
<div class="container">
<div class="row">
<div class="col-sm">1</div>
<div class="col-sm">2</div>
<div class="col-sm">3</div>
</div>
<div class="row">
<div class="col-sm">1</div>
<div class="col-sm">2</div>
</div>
<div class="row">
<div class="col-md-8">Main Content</div>
<div class="col-md-4">SideBar</div>
</div>
</div>
<h1>Gutter</h1>
<div class="container">
<div class="row gx-10">
<div class="col">
<div class="p-3 border">Custom padding</div>
</div>
<div class="col">
<div class="p-3 border">Custom padding</div>
</div>
</div>
</div>
<h1>Buttons</h1>
<div class="container">
<h3>Common buttons</h3>
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>
<button type="button" class="btn btn-link">Link</button>
<h3>Outline buttons</h3>
<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-secondary">Secondary</button>
<button type="button" class="btn btn-outline-success">Success</button>
<button type="button" class="btn btn-outline-danger">Danger</button>
<button type="button" class="btn btn-outline-warning">Warning</button>
<button type="button" class="btn btn-outline-info">Info</button>
<button type="button" class="btn btn-outline-light">Light</button>
<button type="button" class="btn btn-outline-dark">Dark</button>
<h3>Button sizing</h3>
<button type="button" class="btn btn-primary btn-lg">Primary lg</button>
<button type="button" class="btn btn-primary btn-md">Primary md</button>
<button type="button" class="btn btn-primary btn-sm">Primary sm</button>
<h3>Disabled button</h3>
<button type="button" class="btn btn-primary" disabled>Primary lg</button>
</div>
<h1>Cards</h1>
<div class="container">
<div class="card">
<div class="card-body">
The file will have its original line endings in your working directory.
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-body">
The file will have its original line endings in your working directory.
</div>
</div>
</div>
</div>
<div class="card my-3" style="width: 18rem">
<img src="https://image.shutterstock.com/image-vector/baby-shower-childish-print-cute-600w-1667318725.jpg" alt="" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Fox sample</h5>
<div class="card-text">The fox jumps over the lazy dog</div>
</div>
</div>
<div class="card mb-3" style="max-width: 540px;">
<div class="row g-0">
<div class="col-md-4">
<img src="https://image.shutterstock.com/image-vector/baby-shower-childish-print-cute-600w-1667318725.jpg" class="img-fluid" alt="">
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">Fox</h5>
<div class="card-text">This is a sample text</div>
<div class="card-text"><small class="text-muted">last updated 18/01/21 914pm</small></div>
</div>
</div>
</div>
</div>
<div class="card my-3" style="width: 18rem;">
<div class="card-header">
<h5>Card with Header</h5>
</div>
<div class="card-body">
<div class="card-text">Sample texts</div>
<button type="button" class="btn btn-primary btn-sm">Sample button</button>
</div>
</div>
<div class="card-group my-3">
<div class="card">
<img src="https://image.shutterstock.com/image-vector/baby-shower-childish-print-cute-600w-1667318725.jpg" alt="" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Fox sample</h5>
<div class="card-text">The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.</div>
</div>
</div>
<div class="card">
<img src="https://image.shutterstock.com/image-vector/baby-shower-childish-print-cute-600w-1667318725.jpg" alt="" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Fox sample</h5>
<div class="card-text">The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.</div>
</div>
</div>
<div class="card">
<img src="https://image.shutterstock.com/image-vector/baby-shower-childish-print-cute-600w-1667318725.jpg" alt="" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Fox sample</h5>
<div class="card-text">The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.</div>
</div>
</div>
</div>
</div>
<h1>Typography</h1>
<div class="container">
<p>Heading</p>
<h1>H1 Heading</h1>
<h2>H2 Heading</h2>
<h3>H3 Heading</h3>
<h4>H4 Heading</h4>
<h5>H5 Heading</h5>
<h6>H6 Heading</h6>
<p class="h1">h1. Bootstrap heading</p>
<p class="h2">h2. Bootstrap heading</p>
<p class="h3">h3. Bootstrap heading</p>
<p class="h4">h4. Bootstrap heading</p>
<p class="h5">h5. Bootstrap heading</p>
<p class="h6">h6. Bootstrap heading</p>
<p class="display-1">Display 1</p>
<p class="display-2">Display 2</p>
<p class="display-3">Display 3</p>
<p class="display-4">Display 4</p>
<p class="display-5">Display 5</p>
<p class="display-6">Display 6</p>
<p>Inline text elements</p>
<p>You can use the mark tag to <mark>highlight</mark> text.</p>
<p><del>This line of text is meant to be treated as deleted text.</del></p>
<p><s>This line of text is meant to be treated as no longer accurate.</s></p>
<p><ins>This line of text is meant to be treated as an addition to the document.</ins></p>
<p><u>This line of text will render as underlined.</u></p>
<p><small>This line of text is meant to be treated as fine print.</small></p>
<p><strong>This line rendered as bold text.</strong></p>
<p><em>This line rendered as italicized text.</em></p>
<p class="text-center">Text Center</p>
<p class="text-right">Text Right</p>
<br>
<h3>Lists</h3>
<ul class="list-unstyled">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
<br>
<h3>Inline</h3>
<ul class="list-inline">
<li class="list-inline-item">Item 1</li>
<li class="list-inline-item">Item 2</li>
<li class="list-inline-item">Item 3</li>
</ul>
</div>
<hr>
<h1>Responsive Images</h1>
<div class="container">
<h3>Image Fluid</h3>
<div style="width: 40%; border: 1px solid black;">
<img class="img-fluid float-start" src="https://cdn.pixabay.com/photo/2021/01/07/22/15/dandelion-5898546_960_720.jpg" alt="">
</div>
<div style="">
<img class="img-fluid rounded " src="https://cdn.pixabay.com/photo/2021/01/07/22/15/dandelion-5898546_960_720.jpg" alt="">
</div>
</div>
<h1>Spacing</h1>
<div class="" style="border: 2px solid red;">
<p class="mt-xl-3">Hello</p>
<!-- m?-?-? Margin-->
<!-- p?-?-? Padding-->
<div class="mx-auto" style="width: 400px;">
Centered using mx-auto
</div>
</div>
<h1>Tables</h1>
<div class="container">
<table class="table table-bordered border-primary">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Eren</td>
<td>Yaegar</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Mikasa</td>
<td>Ackerman</td>
</tr>
</tbody>
</table>
<!-- table-primary - for color for entire, row level or cell level
table-striped - striped color for tables
table-dark - dark theme
table-hover - for hovering of tables
table-bordered - to create borders for tables
table-borderless - to remove all border in tables
table-sm - to change sizes of table
-->
<h2>Table responsive</h2>
<!-- Table responsive -->
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">heading</th>
<th scope="col">heading</th>
<th scope="col">heading</th>
<th scope="col">heading</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>cell</td>
<td>cell</td>
<td>cell</td>
<td>cell</td>
</tr>
<tr>
<th scope="row">2</th>
<td>cell</td>
<td>cell</td>
<td>cell</td>
<td>cell</td>
</tr>
</tbody>
</table>
</div>
</div>
<h1>Alerts and Toast</h1>
<div class="container">
<div class="alert alert-primary" role="alert">
A simple primary alert—check it out!
</div>
<div class="alert alert-secondary" role="alert">
A simple secondary alert—check it out!
</div>
<div class="alert alert-success" role="alert">
A simple success alert—check it out!
</div>
<div class="alert alert-danger" role="alert">
A simple danger alert—check it out!
</div>
<div class="alert alert-warning" role="alert">
A simple warning alert—check it out!
</div>
<div class="alert alert-info" role="alert">
A simple info alert—check it out!
</div>
<div class="alert alert-light" role="alert">
A simple light alert—check it out!
</div>
<div class="alert alert-dark" role="alert">
A simple dark alert—check it out!
</div>
<h3>Toast</h3>
<div class="toast" role="alert" data-bs-delay="15000" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<img src="..." class="rounded me-2" alt="...">
<strong class="me-auto">Bootstrap</strong>
<small>11 mins ago</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
Hello, world! This is a toast message.
</div>
</div>
</div>
<h1>Navigation</h1>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
<div class="container">
<ul class="nav">
<li class="nav-item active"><a href="" class="nav-link">Link 1</a></li>
<li class="nav-item"><a href="" class="nav-link">Link 2</a></li>
<li class="nav-item"><a href="" class="nav-link">Link 3</a></li>
</ul>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script scr="./node_modules/bootstrap/dist/js/bootstrap.js"></script>
<script>
let toastList = [].slice.call(document.querySelectorAll('.toast'))
let toast = toastList.map(t => {
return new bootstrap.Toast(t, {
animation: true,
autohide: false
})
})
//toast[0].show()
</script>
</body>
</html>