
Подробное описание и демонстрацией работы эффекта наведения под номером №48 для бибилиотеки Bootstrap. Html и CSS код для реализации hover effect как на изображении.
Демонстрация эффекта наведения — стиль 48
<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-48/img-1.jpg" alt=""/> </div> <ul class="social-links"> <li><a href="#" class="fab fa-facebook"></a></li> <li><a href="#" class="fab fa-google"></a></li> <li><a href="#" class="fab fa-twitter"></a></li> </ul> <div class="over-layer"> <h4 class="post"> <a href="#">Williamson</a> <small>Web designer</small> </h4> <span class="likes"><a href="#"><i class="fa fa-thumbs-up"></i>3</a></span> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box{ position: relative; overflow: hidden; box-shadow: 0 0 3px #808080; } .box .pic img{ width: 100%; height: auto; } .pic:after{ content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.3); } .box .social-links{ width: 100%; margin: 0; padding: 0; list-style: none; position: absolute; top: 30%; text-align: center; opacity: 0; transition: opacity 0.40s linear 0s ; } .box:hover .social-links{ opacity: 1; } .box .social-links li{ display: inline-block; margin: 0 5px; } .box .social-links li a{ width: 30px; height: 30px; border-radius: 50%; line-height: 30px; color: #808080; text-align: center; background: #fff; } .box .social-links li a:hover{ text-decoration: none; .box .social-links li .fa-facebook:hover{ color:#4867aa; } .box .social-links li .fa-google:hover{ color:#ea4335; } .box .social-links li .fa-twitter:hover{ color:#00abf1; } .box .over-layer{ width: 100%; padding: 15px; background: #fff; position: absolute; bottom: -100%; left: 0; transition: bottom 0.40s linear 0s ; } .box:hover .over-layer{ bottom: 0; } .box .post{ margin:0; float: left; } .box .post a{ font-size: 14px; color: #333; } .box .post a:hover{ text-decoration: none; color: #568970; } .box .post small{ display: block; margin-top: 5px; text-transform: capitalize; } .box .likes{ float: right; } .box .likes a{ display: inline-block; color: #808080; font-size: 14px; line-height: 35px; } .box .likes a:hover{ text-decoration: none; } .box .likes a i{ margin-right: 5px; } .box .likes a:hover i{ color: #568970; } @media only screen and (max-width: 990px) { .box{ margin-bottom:20px; } }