
Подробное описание и демонстрацией работы эффекта наведения под номером №158 для бибилиотеки Bootstrap. Html и CSS код для реализации hover effect как на изображении.
<div class="container"> <div class="row"> <div class="col-md-4 col-sm-6"> <div class="box"> <img src="https://fokit.ru/demo/images/hover-effect/hover-effect-style-158/img-1.jpg" alt=""/> <div class="box-content"> <h3 class="title">Williamson</h3> <span class="post">Web Developer</span> <ul class="icon"> <li><a href="#" class="fa fa-link"></a></li> <li><a href="#" class="fa fa-search"></a></li> </ul> </div> </div> </div> <div class="col-md-4 col-sm-6"> <div class="box"> <img src="https://fokit.ru/demo/images/hover-effect/hover-effect-style-158/img-2.jpg" alt=""/> <div class="box-content"> <h3 class="title">Kristiana</h3> <span class="post">Web Designer</span> <ul class="icon"> <li><a href="#" class="fa fa-link"></a></li> <li><a href="#" class="fa fa-search"></a></li> </ul> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box{ overflow: hidden; box-shadow: 0 0 3px rgba(0,0,0,0.3); position: relative; } .box:before{ content: ""; width: 100%; height: 100%; background: transparent; position: absolute; top: 0; left: 0; z-index: 1; transition: all 0.4s ease 0s; } .box:hover:before{ background: rgba(0,0,0,0.8); } .box img{ width: 103%; height: auto; position: relative; left: -3%; transition: all 0.4s ease 0s; } .box:hover img{ left: 0; } .box .box-content{ width: 100%; height: 100%; padding: 10px; position: absolute; top: 0; left: 0; z-index: 1; } .box .title{ padding: 10px 0 15px 0; margin: 0 0 20px 0; font-size: 20px; font-weight: bold; color: #fff; opacity: 0; position: relative; transition: all 0.3s ease 0s; } .box:hover .title{ opacity: 1; } .box .title:after{ content: ""; width: 0; height: 2px; background: #fff; position: absolute; bottom: 0; left: 0; transition: all 0.3s ease 0s; } .box:hover .title:after{ width: 100%; } .box .post{ display: inline-block; font-size: 16px; color: #fff; opacity: 0; margin-bottom: 15px; position: relative; left: 100%; transition: all 0.35s ease 0s; } .box:hover .post{ opacity: 1; left: 0; } .box .icon{ list-style: none; padding: 0; margin: 0; opacity: 0; position: relative; top: 50%; transition: all 0.35s ease 0s; } .box:hover .icon{ opacity: 1; top: 0; } .box .icon li{ display: inline-block; } .box .icon li a{ display: block; width: 35px; height: 35px; line-height: 35px; border-radius: 50%; background: #2886c9; text-align: center; font-size: 18px; color: #fff; margin-right: 10px; transition: all 0.5s ease 0s; } .box .icon li a:hover{ transform: rotate(360deg); } @media only screen and (max-width:990px){ .box{ margin-bottom: 30px; } }