"Bootstrap button arrows/directions"
Bootstrap 3.3.0 Snippet by cfpperche

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container-fluid">
<div class="row">
<div class="col-xs-3">
<button type="button" class="btn btn-arrow btn-arrow-up btn-primary">Up Button</button>
</div>
<div class="col-xs-3">
<button type="button" class="btn btn-arrow btn-arrow-bottom btn-success btn-outline">Down Button</button>
</div>
<div class="col-xs-3">
<button type="button" class="btn btn-arrow btn-arrow-left btn-danger btn-outline">Left Button</button>
</div>
<div class="col-xs-3">
<button type="button" class="btn btn-arrow btn-arrow-right btn-warning">Right Button</button>
</div>
</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
/* override */
body {
padding: 50px 0;
}
/* arrow buttons */
.btn-arrow {
position: relative;
}
.btn-arrow:after, .btn-arrow:before {
position: absolute;
line-height: 0;
content: '';
}
.btn-arrow:before {
z-index: 10;
}
.btn-arrow:after {
z-index: 9;
}
.btn-arrow-bottom:before,
.btn-arrow-up:before {
border-right: 6px solid transparent;
border-left: 6px solid transparent;
left: 50%;
margin-left: -6px;
}
.btn-arrow-bottom:after,
.btn-arrow-up:after {
border-right: 8px solid transparent;
border-left: 8px solid transparent;
left: 50%;
margin-left: -8px;
}
.btn-arrow-left:before,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: