
Подробное описание и демонстрацией работы эффекта наведения под номером №69 для бибилиотеки Bootstrap. Html и CSS код для реализации hover effect как на изображении.
<div class="container"> <div class="row"> <div class="col-md-4 col-sm-6"> <div class="box"> <div class="pic"> <img src="https://fokit.ru/demo/images/hover-effect/hover-effect-style-69/img-1.jpg"/> <span class="icon-1"><a href="#"><i class="fa fa-search"></i></a></span> <span class="icon-2"><a href="#"><i class="fa fa-link"></i></a></span> </div> <div class="box-content"> <h3 class="title">Williamson</h3> <span class="post">Web Designer</span> </div> </div> </div> <div class="col-md-4 col-sm-6"> <div class="box"> <div class="pic"> <img src="https://fokit.ru/demo/images/hover-effect/hover-effect-style-69/img-2.jpg"/> <span class="icon-1"><a href="#"><i class="fa fa-search"></i></a></span> <span class="icon-2"><a href="#"><i class="fa fa-link"></i></a></span> </div> <div class="box-content"> <h3 class="title">Kristiana</h3> <span class="post">Web Developer</span> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box .pic{ position: relative; overflow: hidden; } .box .pic:before{ content: ""; width: 100%; height: 100%; position: absolute; top: 0; left: 0; background: #000; opacity: 0; transition: all 0.3s ease 0s; } .box:hover .pic:before{ opacity: 0.4; } .box .pic:after{ content: ""; width: 100%; position: absolute; top: -35%; left: -110%; bottom: -10%; background: rgba(0, 0, 0, 0.6); transform: rotate(10deg); transition: all 0.4s ease 0s; } .box:hover .pic:after{ left: -50%; } .box .pic img{ width: 100%; height: auto; } .box .icon-1, .box .icon-2{ display: block; width: 50%; height: 100%; position: absolute; top: 0; text-align: center; opacity: 0; z-index: 1; transition: all 0.3s ease 0s; } .box .icon-1{ left: 0; } .box .icon-2{ right: 0; } .box:hover .icon-1, .box:hover .icon-2{ opacity: 1; } .box .icon-1 a, .box .icon-2 a{ display: inline-block; font-size: 25px; color: #fff; position: relative; top: 47%; } .box .box-content{ background: #464646; text-align: center; padding: 23px 30px; transition: all 0.3s ease 0s; } .box:hover .box-content{ background: #20b6b8; } .box .title{ font-size: 18px; font-weight: bold; color: #fff; margin-top: 0; } .box .post{ display: block; font-size: 14px; color: #8a8a91; text-transform: uppercase; transition: all 0.3s ease 0s; } .box:hover .post{ color: #fff; } @media only screen and (max-width: 990px){ .box{ margin-bottom: 20px; } }