"animating on click with css"
Bootstrap 4.0.0 Snippet by ALIMUL AL RAZY

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/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="row"> <button class="btn btn-sm btn btn-primary" >click to animate</button> <div id="box"></div> </div> </div>
#box{ background: red; height:60px; width:60px; margin-bottom:20px; } button:active + #box{ -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-fill-mode: both; animation-fill-mode: both; animation-name: bounceIn; animation-duration: .75s; }

Related: See More


Questions / Comments: