
Подробное описание и демонстрацией работы эффекта наведения под номером №127 для библиотеки 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-127/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-127/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.5); perspective: 800px; position: relative; } .box:after{ content: ""; width: 100%; height: 100%; background-color: rgba(173, 129, 65, 0.9); position: absolute; top: 0; left: 0; opacity: 0; transform: rotateX(-90deg); transform-origin: 50% -50% 0; visibility: hidden; transition: all 0.5s ease 0s; } .box:hover:after{ transform: rotateX(0deg); visibility: visible; opacity: 1; } .box img{ width: 100%; height: auto; } .box .box-content{ width: 100%; text-align: center; position: absolute; top: 0; left: 0; opacity: 0; z-index: 1; transform: translate(0%, 0%); transition: all 0.5s ease 0s; } .box:hover .box-content{ opacity: 1; top: 50%; transform: translate(0%, -50%); } .box .title{ font-size: 24px; font-weight: 700; color: #fff; margin-top: 0; } .box .post{ font-size: 16px; color: #fff } .box .icon{ list-style: none; padding: 0; margin: 10px 0 0 0; opacity: 0; transition: all 0.5s ease 0.3s; } .box:hover .icon{ opacity: 1; } .box .icon li{ display: inline-block; margin-right: 5px; position: relative; transition: all 0.5s ease 0.3s; } .box .icon li:first-child{ left: -40%; } .box .icon li:last-child{ right: -40%; } .box:hover .icon li:first-child{ left: 0; } .box:hover .icon li:last-child{ right: 0; } .box .icon li a{ width: 35px; height: 35px; line-height: 34px; border-radius: 50%; border: 1px solid #fff; font-size: 16px; color: #fff; transition: all 0.5s ease 0s; } .box .icon li a:hover{ border-color: transparent; } @media only screen and (max-width:990px){ .box{ margin-bottom: 30px; } }