
Подробное описание и демонстрацией работы эффекта наведения под номером №14 для бибилиотеки Bootstrap. Html и CSS код для реализации hover effect как на изображении.
html разметка для реализации данного эффекта<div class="container"> <div class="row"> <div class="col-md-4 col-sm-6"> <div class="box"> <div class="box-img"> <span class="over-layer"> <ul> <li><a href="#"><i class="fa fa-search"></i></a></li> <li><a href="#"><i class="fa fa-link"></i></a></li> </ul> </span> <img src="https://fokit.ru/demo/images/hover-effect/hover-effect-style-14/img-1.jpg" alt=""> </div> </div> </div> </div> </div>css разметка для реализации данного эффекта
.box{ border:3px solid #333; overflow: hidden; position:relative; } .box .box-img img{ width:100%; height: auto; } .box .box-img:before{ content: ""; position: absolute; top: 5%; left: 4%; width: 92%; height: 90%; opacity: 0; z-index:1; transform: scale(0,1); border-top: 1px solid #fff; border-bottom: 1px solid #fff; transition:all 0.90s ease 0s; } .box .box-img:after{ content: ""; position: absolute; width: 92%; height: 90%; top: 5%; left: 4%; opacity: 0; transform: scale(1,0); border-left: 1px solid #fff; border-right: 1px solid #fff; transition:all 0.90s ease 0s; } .box:hover .box-img:before, .box:hover .box-img:after{ opacity:1; transform: scale(1); } .box .box-img .over-layer{ position: absolute; display:block; width:100%; height:100%; opacity:0; background:rgba(114, 124, 182,0.8); transition:all 0.90s ease 0s; } .box:hover .over-layer{ opacity:1; } .box .over-layer ul{ list-style: none; position: relative; top: 30%; padding: 0; text-align: center; z-index: 1; transition:all 0.6s ease 0s; } .box:hover .over-layer ul{ top: 42%; } .box .over-layer ul li{ display: inline-block; } .box .over-layer ul li a{ border: 2px solid #fff; display: inline-block; width: 45px; height: 45px; line-height: 45px; border-radius: 50%; color:#fff; font-size: 15px; margin-right: 10px; transition: all 0.5s ease 0s; } .box .over-layer ul li a:hover{ background: #fff; color:#333; } @media only screen and (max-width: 990px) { .box{ margin-bottom:20px; } }