Hover Effect Style 215

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

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

Steve Thomas

Web developer

Williamson

заголовок
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-215/img-1.jpg" alt="">
<div class="box-content">
<div class="content">
<h3 class="title">Steve Thomas</h3>
<span class="post">Web developer</span>
<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>
<div class="col-md-4 col-sm-6">
<div class="box">
<img src="https://fokit.ru/demo/images/hover-effect/hover-effect-style-215/img-2.jpg" alt="">
<div class="box-content">
<div class="content">
<h3 class="title">Kristina</h3>
<span class="post">Web designer</span>
<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>
</div>
</div>

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

:root{
--color_1: #fff;
--color_2: #d12138;
}
.box{
font-family: 'Ubuntu', sans-serif;
text-align: center;
overflow: hidden;
position: relative;
}
.box:before{
content: '';
background-color: rgba(255,255,255,0.7);
height: 75%;
width: 75%;
opacity: 0;
transform: translateX(-50%) translateY(-50%) scale(0);
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
transition: all 0.3s ease 0.1s;
}
.box:hover:before{
opacity: 1;
transform: translateX(-50%) translateY(-50%) scale(1);
}
.box img{
width: 100%;
height: auto;
transition: all 0.3s ease 0s;
}
.box:hover img{ filter: hue-rotate(200deg); }
.box .box-content{
color: var(--color_1);
background-color: rgba(0, 0, 0, 0.75);
width: 100%;
height: 100%;
opacity: 1;
transform: rotate(90deg);
transform-origin: 100% 0%;
position: absolute;
left: 0;
top: 0;
z-index: 1;
transition:all 0.3s;
}
.box:hover .box-content{
background-color: rgba(0, 0, 0, 0.01);
transform-origin: 0 100%;
transform: rotate(0);
}
.box .content{
width: 65%;
transform: translateX(-50%) translateY(-50%);
position: absolute;
left: 50%;
top: 50%;
}
.box .title{
color: var(--color_2);
font-size: 22px;
font-weight: 800;
text-transform: uppercase;
text-shadow: 0 0 5px #fff;
margin: 0;
}
.box .post{
color: #000;
font-size: 16px;
text-transform: capitalize;
margin-bottom: 5px;
display: block;
}
.box .icon{
list-style: none;
padding: 0;
margin: 0;
}
.box .icon li{ display: inline-block; }
.box .icon li a{
color: var(--color_1);
background-color: var(--color_2);
font-size: 20px;
text-align: center;
line-height: 35px;
height: 35px;
width: 35px;
border-radius: 50% 0 50% 50%;
display: block;
transition: all 0.3s ease 0s;
}
.box .icon li a:hover{
color: var(--color_2);
background-color: var(--color_1);
box-shadow: 0 0 5px #999 inset, 0 0 0 2px var(--color_2);
}
@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 не будет опубликован. Обязательные поля помечены *