"Stylish label CSS Design"
Bootstrap 4.1.1 Snippet by nirav.mandli

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
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="form-group"></div>
<h3>Normal Labels</h3>
<hr />
<div class="form-group">
<label class="lbl lbl-default"><span>Default</span></label>
<label class="lbl lbl-success"><span>Success</span></label>
<label class="lbl lbl-danger"><span>Danger</span></label>
<label class="lbl lbl-primary"><span>Primary</span></label>
<label class="lbl lbl-warning"><span>Warning</span></label>
</div>
<h3>Full Width Labels</h3>
<hr />
<div class="form-group">
<label class="lbl lbl-default lbl-block"><span>Default</span></label>
<label class="lbl lbl-success lbl-block"><span>Success</span></label>
<label class="lbl lbl-danger lbl-block"><span>Danger</span></label>
<label class="lbl lbl-primary lbl-block"><span>Primary</span></label>
<label class="lbl lbl-warning lbl-block"><span>Warning</span></label>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');
body {
font-size: 14px;
font-family: 'Poppins', sans-serif;
font-weight: 500;
}
.lbl {
padding: .5rem 1rem;
border-radius: .2rem;
cursor: pointer;
transition: all .3s;
transition-timing-function: ease-in-out;
}
.lbl-default {
background-color: rgb(116,120,141, 0.1);
color: #74788d;
}
.lbl-default:hover {
background-color: #74788d;
color: #fff;
}
.lbl-success {
background-color: rgba(10, 187, 135, 0.1);
color: #0abb87;
}
.lbl-success:hover {
background-color: #0abb87;
color: #fff;
}
.lbl-danger {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: