
Подробное описание и демонстрацией работы эффекта наведения под номером №155 для бибилиотеки 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-155/img-1.jpg"/> <div class="box-content"> <h3 class="title">Williamson</h3> <span class="post">Web Developer</span> <ul class="icon"> <li><a href="#" class="fa fa-search"></a></li> <li> <a href="#" class="fa fa-link"></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-155/img-2.jpg"/> <div class="box-content"> <h3 class="title">Kristiana</h3> <span class="post">Web Designer</span> <ul class="icon"> <li><a href="#" class="fa fa-search"></a></li> <li> <a href="#" class="fa fa-link"></a></li> </ul> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box{ background: #1f0322; box-shadow: 0 0 3px rgba(0,0,0,0.3); overflow: hidden; position: relative; transition: all 0.2s ease-out 0s; } .box:after{ content: ""; border: 8px solid #ceff1a; position: absolute; top: 50%; left: 20px; bottom: 50%; right: 20px; opacity: 0; transition: all 0.4s ease-in-out 0s; } .box:hover:after{ top: 20px; bottom: 20px; opacity: 0.9; } .box img{ width: 100%; height: auto; } .box:hover img{ opacity: 0.2; } .box .box-content{ padding: 40px; position: absolute; top: 20px; left: 20px; opacity: 0; z-index: 1; transform: translateX(10%); transition: all 0.2s ease-out 0s; } .box:hover .box-content{ opacity: 1; transform: translateX(0); transition-delay: 0.3s; } .box .title{ font-size: 24px; font-weight: 600; color: #eb5e55; letter-spacing: 1px; margin: 0 0 10px 0; } .box .post{ display: block; font-size: 14px; color: #eb5e55; margin-bottom: 15px; } .box .icon{ padding: 0; margin: 0; list-style: none; opacity: 0; transition: all 0.5s ease 0s; } .box:hover .icon{ opacity: 1; } .box .icon li{ display: inline-block; } .box .icon li a{ display: block; width: 35px; height: 35px; line-height: 35px; background: #ceff1a; text-align: center; font-size: 20px; color: #000; margin-right: 10px; transition: all 0.5s ease 0s; } .box .icon li a:hover{ border-radius: 50%; } @media only screen and (max-width:990px){ .box{ margin-bottom: 30px; } }