"Button with Transition Effect"
Bootstrap 4.1.1 Snippet by anjalish

<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>
.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;}

Related: See More


Questions / Comments: