
Подробное описание и демонстрацией работы эффекта наведения под номером №192 для бибилиотеки Bootstrap. Html и CSS код для реализации hover effect как на изображении.
html разметка для реализации данного эффекта<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-192/img-1.jpg"> <div class="box-content"> <div class="inner-content"> <h3 class="title">Williamson</h3> <span class="post">Web Developer</span> <ul class="icon"> <li><a href="#"><i class="fa fa-search"></i></a></li> <li><a href="#"><i class="fa fa-link"></i></a></li> </ul> </div> </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-192/img-2.jpg"> <div class="box-content"> <div class="inner-content"> <h3 class="title">Kristiana</h3> <span class="post">Web Designer</span> <ul class="icon"> <li><a href="#"><i class="fa fa-search"></i></a></li> <li><a href="#"><i class="fa fa-link"></i></a></li> </ul> </div> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box{ overflow: hidden; position: relative; } .box img{ width: 100%; height: auto; } .box .box-content{ width: 100%; height: 100%; position: absolute; top: 50%; left: 50%; z-index: 2; transform: translate(-50%, -50%); } .box:before, .box:after, .box .box-content:before, .box .box-content:after{ content: ""; width: 100%; height: 100%; background: linear-gradient(45deg,rgba(0,0,0,0.5) 49%, rgba(0,0,0,0.7) 50%); position: absolute; top: -100%; left: 50%; opacity: 0; transform: translateX(-50%) rotate(45deg); transition: all 0.3s steps(4); } .box:after{ top: 100%; background: linear-gradient(45deg,rgba(0,0,0,0.7) 49%, rgba(0,0,0,0.5) 50%); transform: translateX(-50%) rotate(45deg); } .box .box-content:before{ top: 50%; left: -100%; background: linear-gradient(135deg,rgba(0,0,0,0.7) 49%, rgba(0,0,0,0.5) 50%); transform: translateY(-50%) rotate(45deg); } .box .box-content:after{ top: 50%; left: 100%; background: linear-gradient(135deg,rgba(0,0,0,0.5) 49%, rgba(0,0,0,0.7) 50%); transform: translateY(-50%) rotate(45deg); } .box:hover:before{ top: -70%; opacity: 1; } .box:hover:after{ top: 70%; opacity: 1; } .box:hover .box-content:before{ top: 50%; left: -71%; opacity: 1; } .box:hover .box-content:after{ top: 50%; left: 71%; opacity: 1; } .box .inner-content{ width: 100%; height: 50%; text-align: center; color: #fff; position: absolute; top: 65%; left: 50%; z-index: 2; transform: translate(-50%, 50%) scale(0); transition: all 0.3s ease 0.2s; } .box .inner-content:after{ content: ""; width: 210px; height: 210px; border-radius: 50%; background: rgba(248,175,8,0.8); position: absolute; top: 20%; left: 50%; z-index: -1; transform: translate(-50%, -50%); } .box:hover .inner-content{ transform: translate(-50%, -50%) scale(1); transition: all 0.3s ease 0s; } .box .title{ font-size: 22px; font-weight: 700; text-transform: capitalize; margin: 0 0 5px 0; } .box .post{ display: block; font-size:14px; font-style: italic; text-transform: uppercase; margin-bottom: 7px; } .box .icon{ padding: 0; margin: 0; list-style: none; } .box .icon li{ display: inline-block; margin: 0 10px; opacity: 0; transition: all 0.3s ease 0s; } .box:hover .icon li{ margin: 0 3px; opacity: 1; } .box .icon li a{ display: block; width: 28px; height: 28px; line-height: 28px; border-radius: 20%; background: #fff; font-size: 16px; color: #505050; transition: all 0.3s ease 0s; } .box .icon li a:hover{ background: #fff; color: #f8af08; box-shadow: 0 0 5px rgba(0,0,0,0.5) inset; } @media only screen and (max-width:990px){ .box{ margin-bottom: 30px; } }