
Подробное описание и демонстрацией работы эффекта наведения под номером №85 для бибилиотеки 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-85/img-1.jpg"> <div class="box-content"> <h3 class="title">Williamson</h3> <span class="post">web designer</span> <ul class="icon"> <li><a href="#"><i class="fa fa-link"></i></a></li> <li><a href="#"><i class="fa fa-plus"></i></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-85/img-2.jpg"> <div class="box-content"> <h3 class="title">Kristiana</h3> <span class="post">Web Developer</span> <ul class="icon"> <li><a href="#"><i class="fa fa-link"></i></a></li> <li><a href="#"><i class="fa fa-plus"></i></a></li> </ul> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box{ position: relative; overflow: hidden; text-align: center; color: #fff; } .box img{ width: 100%; height: auto; } .box:before{ content: ""; width: 100%; height: 100%; position: absolute; top: 0; left: 0; background: rgba(0, 0, 0, 0.2); transition: all 0.3s ease 0s; } .box:hover:before{ background: rgba(0, 0, 0, 0.5); } .box .box-content{ width: 100%; height: 100%; position: absolute; top: 0; left: 0; padding: 120px 0; z-index: 1; transition: all 0.3s ease 0s; } .box .box-content:before{ content:""; border-left: 1px solid #fff; border-right: 1px solid #fff; position: absolute; top: 100%; left: 30px; bottom: 15px; right: 30px; opacity: 0; z-index: -1; transition: all 0.3s ease 0.3s; } .box:hover .box-content:before{ top: 15px; opacity: 1; } .box .box-content:after{ content:""; border-top: 1px solid #fff; border-bottom: 1px solid #fff; position: absolute; top: 30px; left: 15px; bottom: 30px; right: 15px; opacity: 0; z-index: -1; transform: skew(-100deg); transition: all 0.3s ease 0s; } .box:hover .box-content:after{ opacity: 1; transform: skew(0deg); } .box .title{ margin: 30px 0 20px 0; font-size: 25px; font-weight: 700; transition: all 0.3s ease 0s; } .box:hover .title{ margin-top: 10px; } .box .post{ display: block; font-size: 14px; text-transform: capitalize; margin-bottom: 30px; opacity: 0; transition: all 0.3s ease 0s; } .box .icon{ padding: 0; margin: 0; list-style: none; width: 100%; } .box .icon li{ display: inline-block; } .box .icon li a{ display: inline-block; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; background: #242424; color: #fff; margin-right: 10px; opacity: 0; z-index: 1; transition: all 0.3s ease 0s; } .box .icon li a:hover{ background: #028090; } .box:hover .post, .box:hover .icon a{ opacity: 1; } @media only screen and (max-width:990px){ .box{ margin-bottom: 30px; } }