Hover Effect Style 162

Подробное описание и демонстрацией работы эффекта наведения под номером №162 для бибилиотеки Bootstrap. Html и CSS код для реализации hover effect как на изображении.

Демонстрация эффекта наведения — стиль 162

Williamson

Web Developer

Kristiana

заговолокer

Steve Thomas

Web Developer
html разметка для реализации данного эффекта

<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-162/img-1.jpg">
<div class="box-content">
<h3 class="title">Williamson</h3>
<span class="post">Web Developer</span>
<ul class="icon">
<li><a href="#" class="fa fa-search"></a></li>
<li><a href="#" class="fa fa-link"></a></li>
</ul>
</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-162/img-2.jpg">
<div class="box-content">
<h3 class="title">Kristiana</h3>
<span class="post">Web Designer</span>
<ul class="icon">
<li><a href="#" class="fa fa-search"></a></li>
<li><a href="#" class="fa fa-link"></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>

css разметка для реализации данного эффекта

.box{
text-align: center;
box-shadow: 0 0 3px rgba(0,0,0,0.3);
position: relative;
}
.box:before,
.box:after{
content: "";
width: 0;
height: 15%;
background: rgba(255,255,255,0.6);
position: absolute;
top: 50%;
left: 0;
z-index: 2;
transform: translateY(-50%);
transition: all 0.5s ease 0s;
}
.box:after{
left: auto;
right: 0;
}
.box:hover:before,
.box:hover:after{ width: 25%; }
.box img{
width: 100%;
height: auto;
}
.box .box-content{
width: 100%;
height: 100%;
background: rgba(0,0,0,0.8);
padding-top: 23%;
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: all 0.2s ease 0s;
}
.box:hover .box-content{ opacity: 1; }
.box .title{
font-size: 22px;
font-weight: 700;
color: #ee4266;
letter-spacing: 1px;
text-transform: uppercase;
margin: 0 0 10px;
}
.box .post{
display: block;
font-size: 15px;
font-style: italic;
font-weight: 600;
color: #fff;
margin-bottom: 20px;
}
.box .icon{
padding: 0;
margin: 0;
list-style: none;
}
.box .icon li{ display: inline-block; }
.box .icon li a{
display: inline-block;
width: 40px;
height: 40px;
line-height: 38px;
border-radius: 50%;
border: 2px solid #fff;
font-size: 16px;
color: #fff;
margin-right: 10px;
position: relative;
transition: all 0.3s ease 0s;
}
.box .icon li a:hover:after{
content: "";
width: 100%;
height: 100%;
border-radius: 50%;
position: absolute;
top: 0;
left: 0;
animation: hoverEffect 1.3s ease-out 75ms;
}
@keyframes hoverEffect{
0%{ opacity: 0.3; }
40%{
opacity: 0.5;
box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 10px 10px #fff, 0 0 0 10px rgba(255,255,255,0.5);
}
100%{
box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 10px 10px #fff, 0 0 0 10px rgba(255,255,255,0.5);
transform: scale(1.5);
opacity: 0;
}
}
@media only screen and (max-width:990px){
.box{ margin-bottom: 30px; }
}



Теги:
0

Оставить своё мнение

Ваш e-mail не будет опубликован. Обязательные поля помечены *