
Подробное описание и демонстрацией работы эффекта наведения под номером №23 для бибилиотеки Bootstrap. Html и CSS код для реализации hover effect как на изображении.
<div class="container"> <div class="row"> <div class="col-md-4 col-sm-6"> <div class="box"> <div class="box-img"> <a href="#" ><img src="https://fokit.ru/demo/images/hover-effect/hover-effect-style-23/img-1.jpg" alt=""></a> </div> <div class="box-content"> <h3 class="title">Williamson</h3> <span class="tag-line">Lorem ipsum dolor sit amet.</span> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box{ position: relative; overflow: hidden; z-index: 1; } .box .box-img img{ border:4px solid #808080; width:100%; height:auto; transform: scale(1,1) translateY(0px); transition: all 0.8s ease 0s; } .box:hover .box-img img{ transform: translateY(-50px) scale(0.5); } .box .box-content{ width:100%; height:100%; position: absolute; top:0; left:0; border:4px solid #808080; text-align:center; z-index:-1; opacity:0; background:#272731; transform: scale(0); padding:10px 40px; transition: all 0.8s ease 0s; } .box:hover .box-content{ transform: scale(1,1); opacity: 1; } .box .title{ position: relative; top:65%; font-size:18px; font-weight: 500; color:#fff; letter-spacing:2px; text-transform: uppercase; } .box .title:after{ content:""; border:1px solid #fff; display: block; margin-top:10px; } .box .tag-line{ position: relative; top:65%; font-size:17px; color:#fff; text-transform:capitalize; } @media only screen and (max-width:990px) { .box{ margin-bottom:20px; } } @media only screen and (max-width:480px) { .box .title{ font-size:16px; letter-spacing:0; top:60%; } .box .tag-line{ top:60%; font-size: 12px; } }