"Bootstrap 4 Card Effect"
Bootstrap 4.0.0 Snippet by rodrigozem

<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="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <body> <div class="container"> <div class="card-deck"> <div class="card"> <div class="item"> <img class="card-img-top" src="http://lorempixel.com/318/348/sports/1/" alt="Card image cap"> </div> <div class="border-effect bg-warning"></div> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card"> <div class="item"> <img class="card-img-top" src="http://lorempixel.com/318/348/sports/2/" alt="Card image cap"> </div> <div class="border-effect bg-warning"></div> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card"> <div class="item"> <img class="card-img-top" src="http://lorempixel.com/318/348/sports/3/" alt="Card image cap"> </div> <div class="border-effect bg-warning"></div> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card"> <div class="item"> <img class="card-img-top" src="http://lorempixel.com/318/348/sports/4/" alt="Card image cap"> </div> <div class="border-effect bg-warning"></div> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> </div> </div> <!-- Optional JavaScript --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
.border-effect { height:15px;width:20%;margin-top: 2px; } * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .item { position: relative; overflow: hidden; width: 100%; } .item img { max-width: 100%; -moz-transition: all 0.3s; -webkit-transition: all 0.3s; transition: all 0.3s; }
$("document").ready(function(){ $(".card").mouseover (function(){ var i = $(this).index(); $(".border-effect").eq(i).animate({ width: "100%" }, 200 ); $(this).find("img").css({ '-moz-transform':'scale(1.1)', '-webkit-transform':'scale(1.1)', 'transform':'scale(1.1)' }) }) $(".card").mouseleave(function(){ var i = $(this).index(); $(".border-effect").eq(i).animate({ width: "20%" }, 200 ); $(this).find("img").css({ '-moz-transform':'scale(1.0)', '-webkit-transform':'scale(1.0)', 'transform':'scale(1.0)' }) }) })

Related: See More


Questions / Comments: