"Tile hover effect"
Bootstrap 4.1.1 Snippet by ReinierB78

<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 ----------> <div class="tile-row"> <div class="tile" style="background-image: url('https://picsum.photos/1800/400/')"> <div class="content-tile"> <h3>Service</h3> <div class="content-tile-content"> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. </p> </div> </div> </div> <div class="after-tile" style="background-image: url('https://picsum.photos/1800/400/')"></div> <div class="tile" style="background-image: url('https://picsum.photos/1800/401/')"> <div class="content-tile"> <h3>Service</h3> <div class="content-tile-content"> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. </p> </div> </div> </div> <div class="after-tile" style="background-image: url('https://picsum.photos/1800/401/')"></div> <div class="tile" style="background-image: url('https://picsum.photos/1800/402/')"> <div class="content-tile"> <h3>Service</h3> <div class="content-tile-content"> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. </p> </div> </div> </div> <div class="after-tile" style="background-image: url('https://picsum.photos/1800/402/')"></div> <div class="tile" style="background-image: url('https://picsum.photos/1800/403/')"> <div class="content-tile"> <h3>Service</h3> <div class="content-tile-content"> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. </p> </div> </div> </div> <div class="after-tile" style="background-image: url('https://picsum.photos/1800/403/')"></div> </div>
.tile-row { margin-top: 60px; width: 100%; position: relative; } .tile-row-title { position: absolute; z-index: 20; width: 100vw; text-align: center; font-size: 6rem; color: #fff; top: -50px; transition: all .4s; } .hide { opacity: 0; z-index: -10; transition: all .4s; } .tile { width: 25%; height: 300px; background-position: center; background-size: cover; background-repeat: no-repeat; position: relative; float: left; overflow: hidden; transition: all 0.4s; } .tile:before { content: " "; position: absolute; width: 5px; height: 300px; background-color: #fff; right: 0px; z-index: 10; } .tile:after { content: " "; position: absolute; width: 50px; height: 300px; background-color: rgba(0,0,0,0); right: -0px; z-index: 11; } .content-tile { position: relative; top: 0px; left: 0px; height: 300px; display: block; color: #fff; z-index: 7; text-align: center; padding: 30px; } .content-tile-content { opacity: 0; transition: all 0.4s; } .content-tile:hover > .content-tile-content { opacity: 1; transition: all 0.4s; } .after-tile { position: absolute; left: 0px; top: 0px; width: 100%; height: 300px; backgound-size: contain; background-repeat: no-repeat; background-position: center; opacity: 0; z-index: -1; transition: all 0.4s; } .tile:hover + .after-tile { z-index: 2; opacity: 1; transition: all 0.4s; } .after-tile:hover { z-index: 2; transition: all 0.4s; opacity: 1; }
$(document).ready(function(){ function hide() { $('.tile-row-title').addClass('hide'); } function show() { $('.tile-row-title').removeClass('hide'); } $('.tile-row').on('mouseenter', hide); $('.tile-row').on('mouseleave', show); });

Related: See More


Questions / Comments: