
Подробное описание и демонстрацией работы эффекта наведения под номером №131 для бибилиотеки 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-131/img-1.jpg"> <div class="box-content"> <div class="content"> <h3 class="title">Williamson</h3> <a href="#" class="read-more">Read more</a> </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-131/img-2.jpg"> <div class="box-content"> <div class="content"> <h3 class="title">Kristiana</h3> <a href="#" class="read-more">Read more</a> </div> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box{ text-align: center; overflow: hidden; box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); position: relative; } .box img{ width: 100%; height: auto; } .box .box-content, .box .box-content:after{ width: 100%; height: 100%; background: rgba(36, 50, 86, 0.7); position: absolute; top: 0; left: 0; opacity: 0; transition: all 0.3s ease 0s; } .box:hover .box-content{ opacity: 1; } .box .box-content:after{ content: ""; background: #f95b34; } .box:hover .box-content:after{ opacity: 0.7; transform: skew(30deg); } .box .content{ width: 100%; position: absolute; top: 40%; left: 0; color: #fff; z-index: 1; } .box .title{ display: block; font-size: 22px; font-weight: 700; color: #fff; text-transform: uppercase; margin: 0 0 20px 0; } .box .read-more{ display: inline-block; padding: 5px 20px; font-size: 15px; font-weight: 600; color: #243256; border: 2px solid #243256; border-radius: 5px; transition: all 0.5s ease 0s; } .box .read-more:hover{ background: #243256; color: #fff; } @media only screen and (max-width:990px){ .box{ margin-bottom: 30px; } }