Hover Effect Style 220

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

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

Steve Thomas

Web developer

Williamson

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

<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css /> -->
<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-220/img-1.jpg" alt="">
<div class="box-content">
<h3 class="title">Steve Thomas</h3>
<span class="post">Web developer</span>
</div>
<ul class="icon">
<li><a href="#"><i class="fa fa-search"></i></a></li>
<li><a href="#"><i class="fa fa-link"></i></a></li>
</ul>
</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-220/img-2.jpg" alt="">
<div class="box-content">
<h3 class="title">Kristina</h3>
<span class="post">Web designer</span>
</div>
<ul class="icon">
<li><a href="#"><i class="fa fa-search"></i></a></li>
<li><a href="#"><i class="fa fa-link"></i></a></li>
</ul>
</div>
</div>
</div>
</div>

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

.box{
font-family: 'Fira Sans', sans-serif;
text-align: center;
overflow: hidden;
position: relative;
}
.box:before,
.box:after{
content: '';
background-color: rgba(255,255,255,0.7);
height: 25%;
width: 100%;
opacity: 0;
transform: translateX(-50%);
position: absolute;
left: 50%;
top: -100%;
transition: all 0.3s;
}
.box:after{ top: 100%; }
.box:hover:before{
transform: translateX(-50%) translateY(0);
top: 0;
}
.box:hover:after{
transform: translateX(-50%) translateY(0);
top: auto;
bottom: 0;
}
.box:hover:before,
.box:hover:after{
height: 50%;
opacity: 1;
animation: animate 0.5s linear;
}
.box img{
width: 100%;
height: auto;
}
.box .box-content{
width: 100%;
opacity: 0;
filter: blur(10px);
transform: translateX(-50%) translateY(-50%);
position: absolute;
top: 60%;
left: 50%;
z-index: 1;
transition: all 0.4s ease 0.1s;
}
.box:hover .box-content{
opacity: 1;
filter: blur(0);
top: 50%;
}
.box .title{
color: #4834d4;
font-size: 25px;
font-weight: 600;
text-transform: uppercase;
margin: 0;
}
.box .post{
color: #444;
font-size: 15px;
font-weight: 600;
text-transform: uppercase;
}
.box .icon{
padding: 0;
margin: 0;
list-style: none;
opacity: 0;
transform: translateX(-50%);
position: absolute;
left: 50%;
bottom: 10px;
z-index: 1;
transition: all 0.3s ease 0.3s;
}
.box:hover .icon{ opacity: 1; }
.box .icon li{ display: inline-block; }
.box .icon li a{
color: #fff;
background-color: #4834d4;
line-height: 25px;
height: 30px;
width: 30px;
border: 2px solid #fff;
border-radius: 50%;
box-shadow: 3px -3px 5px #555;
display: block;
transition: all 0.3s;
}
.box .icon li a:hover{
color: #4834d4;
background-color: #fff;
border-color: #4834d4;
}
@keyframes animate{
80%{ width: 90%; }
85%{ width: 95%; }
93%{ width: 85%; }
100%{ width: 100%; }
}
@media only screen and (max-width:990px){
.box{ margin-bottom: 30px; }
}
@media only screen and (max-width:479px){
.box .title{ font-size: 20px; }
}



Теги:
0

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

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