"Button with Transition Effect"
Bootstrap 4.1.1 Snippet by anjalish

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
<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 ---------->
<section>
<div class="container">
<div class="row">
<div class="col-md-6 col-lg-6 col-xl-6">
<div class="hover-effect">
<button type="button" class="btn btn-lg btn-success mt-4">Basic Button With Hover Effect</button>
</div>
</div>
</div>
</div>
</section>
<section>
<div class="container">
<div class="row">
<div class="col-md-6 col-lg-6 col-xl-6">
<div class="hover-effect">
<button type="button" class="butn btn btn-lg btn-success mt-4"><span>Basic Button With Hover Effect</span></button>
</div>
</div>
</div>
</div>
</section>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.hover-effect button {
transition: width 1s, 0.1s transition ease-out;
width: 354px;
height: 58px;}
.hover-effect button:hover {
width: 450px;}
.butn span:after {
content: '\00bb';
transition: 0.2s ease;
position: absolute;
opacity: 0;}
.butn:hover span:after {
opacity: 1;
/* right: 0px; */
margin-left: 10px;
background-color: yellowgreen;
width: 50px;}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: