"Image hover effect "
Bootstrap 4.1.1 Snippet by onojagodday

<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="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="box"> <div class="imgBox"> <img src="https://www.planwallpaper.com/static/images/47141475-hd-wallpapers.jpg"> </div> <div class="content"> <h2>Image Hover Effects</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p> </div> </div> <div class="box"> <div class="imgBox"> <img src="https://www.planwallpaper.com/static/images/47141475-hd-wallpapers.jpg"> </div> <div class="content"> <h2>Image Hover Effects</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p> </div> </div> <div class="box"> <div class="imgBox"> <img src="https://www.planwallpaper.com/static/images/47141475-hd-wallpapers.jpg"> </div> <div class="content"> <h2>Image Hover Effects</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p> </div> </div> <div class="box"> <div class="imgBox"> <img src="https://www.planwallpaper.com/static/images/47141475-hd-wallpapers.jpg"> </div> <div class="content"> <h2>Image Hover Effects</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p> </div> </div> <div class="box"> <div class="imgBox"> <img src="https://www.planwallpaper.com/static/images/47141475-hd-wallpapers.jpg"> </div> <div class="content"> <h2>Image Hover Effects</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p> </div> </div> <div class="box"> <div class="imgBox"> <img src="https://www.planwallpaper.com/static/images/47141475-hd-wallpapers.jpg"> </div> <div class="content"> <h2>Image Hover Effects</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p> </div> </div> </div>
body { margin:0; padding:0; font-family:sans-serif; } .container { position:relative; width:1200px; height:600px; margin:80px auto 0; } .container .box { position:relative; width:calc(400px - 60px); height:calc(300px - 30px); background:#000; float:left; margin:15px; box-sizing:border-box; overflow:hidden; box-shadow:0 5px 10px rgba(0,0,0,.8); } .container .box:before { content:''; position:absolute; top:10px; left:10px; right:10px; bottom:10px; border-top:1px solid #fff; border-bottom:1px solid #fff; box-sizing:border-box; transition:0.5s; transform: scaleX(0); opacity:0; } .container .box:hover:before { transform:scaleX(1); opacity:1; } .container .box:after { content:''; position:absolute; top:10px; left:10px; right:10px; bottom:10px; border-left:1px solid #fff; border-right:1px solid #fff; box-sizing:border-box; transition:0.5s; transform: scaleY(0); opacity:0; } .container .box:hover:after { transform:scaleY(1); opacity:1; } .container .box .imgBox { position:relative; } .container .box .imgBox img { width:100%; transition:0.5s; } .container .box:hover .imgBox img { opacity:.2; transform:scale(1.2); } .container .box .content { position:absolute; width:100%; top:50%; transform:translateY(-50%); z-index:2; padding:20px; box-sizing:border-box; text-align:center; } .container .box .content h2 { margin: 0 0 10px; padding:0; color:#fff; transition:0.5s; transform:translateY(-50px); opacity:0; visibility:hidden; } .container .box .content p { margin:0; padding:0; color:#fff; transform:translateY(50px); opacity:0; visibility:hidden; } .container .box:hover .content h2, .container .box:hover .content P { opacity:1; visibility:visible; transform:translateY(0px); }

Related: See More


Questions / Comments: