-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathList-Groups.html
93 lines (93 loc) · 6.14 KB
/
List-Groups.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>list-group</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-5 mb-5 pb-5">
<p class="display-6 text-capitalize text-danger">list-group:</p>
<p class="lead text-capitalize">To create a basic list group</p>parent tag <code>class="list-group"</code>,child tag <code>class="list-group-item"</code>
<ul class="list-group">
<li class="list-group-item">first-list</li>
<li class="list-group-item">second-list</li>
<li class="list-group-item">third-list</li>
</ul>
<hr>
<hr>
<p class="display-6 text-capitalize text-danger">
also add active list & disable list:
</p>
<p class="lead text-capitalize">add active in child tag,<code>class="list-group-item active"</code></p>
<p class="lead text-capitalize">add disable in child tag,<code>class="list-group-item disabled"</code></p>
<ul class="list-group">
<li class="list-group-item active">active-list</li>
<li class="list-group-item">list</li>
<li class="list-group-item disabled">disable-list</li>
</ul>
<hr>
<hr>
<p class="display-6 text-capitalize text-danger">hover effect in list-group:</p>
<p class="lead text-capitalize "> if you want a grey background color on hover:<code class="text-lowercase">class="list-group-item list-group-item-action"</code></p>
<ul class="list-group">
<li class="list-group-item list-group-item-action">first-list</li>
<li class="list-group-item list-group-item-action">second-list</li>
<li class="list-group-item list-group-item-action">third-list</li>
</ul>
<hr>
<hr>
<p class="display-6 text-capitalize text-danger">remove some borders and rounded corners:</p>
<p class="lead text-capitalize">use flush class : <br> paren tag <code class="text-lowercase">class="list-group list-group-flush"</code> , <br> child tag <code>class="list-group-list"</code>.</p>
<ul class="list-group list-group-flush">
<li class="list-group-item list-group-item-action">first-list</li>
<li class="list-group-item list-group-item-action">second-list</li>
<li class="list-group-item list-group-item-action">third-list</li>
</ul>
<hr>
<hr>
<p class="display-6 text-danger text-capitalize">Numbered List Groups:</p>
<p class="lead text-capitalize"> create list items with numbers in front<code class="text-lowercase">list-group list-group-numbered</code></p>
<ul class="list-group list-group-numbered">
<li class="list-group-item list-group-item-action">first-list</li>
<li class="list-group-item list-group-item-action">second-list</li>
<li class="list-group-item list-group-item-action">third-list</li>
</ul>
<hr>
<hr>
<p class="display-6 text-capitalize text-danger">Horizontal List Groups:</p>
<p class="lead text-capitalize">If you want the list items to display horizontally <code>class="list-group list-group-horizontal"</code></p>
<ul class="list-group list-group-horizontal">
<li class="list-group-item list-group-item-action">first-list</li>
<li class="list-group-item list-group-item-action">second-list</li>
<li class="list-group-item list-group-item-action">third-list</li>
</ul>
<hr>
<hr>
<p class="display-6 text-capitalize text-danger">contextual-color List</p>
<p class="lead text-capitalize">If you want the list items to display different contextual-color</p>
<ul class="list-group">
<li class="list-group-item list-group-item-primary">primary-contextual-color-list, <code class="text-lowercase">class="list-group-item-primary"</code></li>
<li class="list-group-item list-group-item-secondary">secondary-contextual-color-list, <code class="text-lowercase">class="list-group-item-secondary"</code></li>
<li class="list-group-item list-group-item-success">success-contextual-color-list, <code class="text-lowercase">class="list-group-item-success"</code></li>
<li class="list-group-item list-group-item-danger">danger-contextual-color-list, <code class="text-lowercase">class="list-group-item-danger"</code></li>
<li class="list-group-item list-group-item-warning">warning-contextual-color-list, <code class="text-lowercase">class="list-group-item-warning"</code></li>
<li class="list-group-item list-group-item-info">information-contextual-color-list, <code class="text-lowercase">class="list-group-item-info"</code></li>
<li class="list-group-item list-group-item-dark">dark-contextual-color-list, <code class="text-lowercase">class="list-group-item-dark"</code></li>
<li class="list-group-item list-group-item-light">light-contextual-color-list, <code class="text-lowercase">class="list-group-item-light"</code></li>
</ul>
<hr>
<hr>
<p class="display-6 text-capitalize text-danger">add badge in list:</p>
<p class="lead text-capitalize">see the first list the badge is end of the line ,<code class="text-lowercase">class="list-group-item d-flex justify-content-between align-items-center"</code></p>
<ul class="list-group">
<li class="list-group-item list-group-item-action d-flex justify-content-between align-center">first-list <span class="badge bg-primary">11</span></li>
<li class="list-group-item list-group-item-action">second-list <span class="badge bg-primary">21</span></li>
<li class="list-group-item list-group-item-action">rounded badge <span class="badge rounded-pill bg-primary">15</span></li>
</ul>
</div>
</body>
</html>