"Thumbnail Caption background image Hover Effect"
Bootstrap 3.3.0 Snippet by vinodkini05

<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"> <div class="row"> <div class="col-md-3"> <div class="thumbnail"> <a href="#"></a> <div class="caption"> <h4>Thumbnail Headline</h4> <p>landscape image clickable</p> </div> <div class="img-block" style="background-image:url(http://lorempixel.com/400/300/sports/1/)"> <img class="img-responsive" src="http://static1.squarespace.com/static/513fb979e4b0f56ab2da30d9/5147315ce4b0ad02dfd3724e/51473df6e4b008b1fd932035/1363623414821/transparent.png" alt="..."> </div> </div> </div> <div class="col-md-3"> <div class="thumbnail"> <div class="caption cover"> <h4>Thumbnail Headline</h4> <p>portrait image</p> <p><a href="" class="label label-danger" rel="tooltip" title="Zoom">Zoom</a> <a href="" class="label label-default" rel="tooltip" title="Download now">Download</a></p> </div> <div class="img-block" style="background-image:url(http://lorempixel.com/300/400/sports/2/)"> <img src="http://static1.squarespace.com/static/513fb979e4b0f56ab2da30d9/5147315ce4b0ad02dfd3724e/51473df6e4b008b1fd932035/1363623414821/transparent.png" alt="..."> </div> </div> </div> <div class="col-md-3"> <div class="thumbnail"> <div class="caption cover"> <h4>Thumbnail Headline</h4> <p>panoramic image</p> <p><a href="" class="label label-danger" rel="tooltip" title="Zoom">Zoom</a> <a href="" class="label label-default" rel="tooltip" title="Download now">Download</a></p> </div> <div class="img-block" style="background-image:url(http://lorempixel.com/400/200/sports/3/)"> <img src="http://static1.squarespace.com/static/513fb979e4b0f56ab2da30d9/5147315ce4b0ad02dfd3724e/51473df6e4b008b1fd932035/1363623414821/transparent.png" alt="..."> </div> </div> </div> <div class="col-md-3"> <div class="thumbnail"> <div class="caption cover"> <h4>Thumbnail Headline</h4> <p>squared smaller image</p> <p><a href="" class="label label-danger" rel="tooltip" title="Zoom">Zoom</a> <a href="" class="label label-default" rel="tooltip" title="Download now">Download</a></p> </div> <div class="img-block" style="background-image:url(http://lorempixel.com/300/300/sports/4/)"> <img src="http://static1.squarespace.com/static/513fb979e4b0f56ab2da30d9/5147315ce4b0ad02dfd3724e/51473df6e4b008b1fd932035/1363623414821/transparent.png" alt="..."> </div> </div> </div> </div> </div><!-- /.container -->
body { padding-top: 50px; } .thumbnail { position:relative; overflow:hidden; } .caption { position:absolute; bottom:0; right:0; background:rgba(66, 139, 202, 0.25); width:100%; height:auto; padding:2%; display: none; text-align:center; color:#fff !important; z-index:2; } .caption.cover { height: 100%; } .thumbnail > a { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index:3; } .img-block { background-repeat: no-repeat; background-size: contain; background-position: center; background-color: #e1e1e1; } .img-block > img { width: 100%; height: auto; }
$( document ).ready(function() { $("[rel='tooltip']").tooltip(); $('.thumbnail').hover( function(){ $(this).find('.caption').slideDown(250); //.fadeIn(250) }, function(){ $(this).find('.caption').slideUp(250); //.fadeOut(205) } ); $('.thumbnail > a').on('click tap',function(e) { alert('clicked'); }); });

Related: See More


Questions / Comments: