Step 1:Create css file like style.css.
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;1,100;1,300&family=Slabo+27px&display=swap");
*::after,
*::before {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-family: "Roboto", sans-serif;
font-style: normal;
}
a,
a:hover,
a:focus,
a:active,
a:link {
outline: none;
text-decoration: none;
color: #000;
}
.bs-card {
position: relative;
padding: 100px 0;
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
}
.bs-card .card {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
min-width: 350px;
max-width: 350px;
height: 275px;
background-color: #fff;
background-clip: border-box;
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.2);
border-radius: 0;
border: 0;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
transition: all 0.4s ease;
margin: 50px 0;
}
.bs-card .card:hover {
height: 425px;
}
.bs-card .card .card-img img {
width: 100%;
height: auto;
}
.bs-card .card .card-img {
position: absolute;
top: -55px;
left: 25px;
right: 25px;
width: auto;
border-radius: 0;
box-shadow: 0 15px 20px -12px rgba(0, 0, 0, 0.8);
z-index: 1;
}
.bs-card .card .card-body {
position: relative;
margin-top: -140px;
padding: 10px 15px;
text-align-last: center;
color: #111;
visibility: hidden;
opacity: 0;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.bs-card .card:hover .card-body {
visibility: visible;
opacity: 1;
margin-top: 250px;
}
.bs-card .card .card-body .card-description p {
font-weight: 300;
font-size: 15px;
color: #000000e3;
text-align: center;
}
.bs-card .card .card-body .card-share ul {
text-align: center;
list-style: none;
margin: 0;
padding: 0;
}
.bs-card .card .card-body .card-share ul li {
display: inline-block;
margin: 10px;
}
.bs-card .card .card-body .card-share ul li a i {
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
border-radius: 40px;
font-size: 20px;
}
.bs-card .card .card-body .card-share ul li a i.fa.fa-facebook {
color: #3B5998;
}
.bs-card .card .card-body .card-share ul li a i.fa.fa-twitter {
color: #55ACEE;
}
.bs-card .card .card-body .card-share ul li a i.fa.fa-instagram {
color: #125688;
}
.bs-card .card .card-body .card-share ul li a i.fa.fa-youtube {
color: #bb0000;
}
.bs-card .card .card-body .card-share ul li a i.fa.fa-linkedin {
color: #007bb5;
}
@media (max-width: 300px) {
.bs-card .card .card-img {
position: absolute;
top: -26px;
left: 25px;
right: 25px;
width: auto;
border-radius: 0;
box-shadow: 0 15px 20px -12px rgba(0, 0, 0, 0.8);
z-index: 1;
}
}
@media (max-width: 340px) {
.bs-card .card {
height: 215px;
}
.bs-card .card:hover {
height: 375px;
}
.bs-card .card:hover .card-body {
margin-top: 190px;
}
}
@media (max-width: 375px) {
.bs-card .card {
min-width: 100%;
max-width: 100%;
}
.bs-card .card .card-body .card-share ul li {
display: inline-block;
margin: 0;
}
.bs-card .card .card-body .card-share ul li a i {
width: 35px;
height: 35px;
line-height: 35px;
}
}
@media (max-width: 768px) {
.bs-card .card {
margin: 50px 0;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<title>card hover</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<!-- container -->
<div class="container">
<section class="bs-card">
<div class="card">
<div class="card-img">
<img src="images/team/image-1.jpg" alt="Not Images" />
</div>
<div class="card-body">
<div class="card-title">
<h5>Lisy Johnson</h5>
</div>
<div class="card-description">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing magna aliqua Ut enim ad minim veniam proident laborum.
</p>
</div>
<div class="card-share">
<ul>
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-instagram"></i></a></li>
<li><a href="#"><i class="fa fa-youtube"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
<div class="card">
<div class="card-img">
<img src="images/team/image-2.jpg" alt="Not Images" />
</div>
<div class="card-body">
<div class="card-title">
<h5>Lisy Johnson</h5>
</div>
<div class="card-description">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing magna aliqua Ut enim ad minim veniam proident laborum.
</p>
</div>
<div class="card-share">
<ul>
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-instagram"></i></a></li>
<li><a href="#"><i class="fa fa-youtube"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
<div class="card">
<div class="card-img">
<img src="images/team/image-3.jpg" alt="Not Images" />
</div>
<div class="card-body">
<div class="card-title">
<h5>Lisy Johnson</h5>
</div>
<div class="card-description">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing magna aliqua Ut enim ad minim veniam proident laborum.
</p>
</div>
<div class="card-share">
<ul>
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-instagram"></i></a></li>
<li><a href="#"><i class="fa fa-youtube"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
</section>
</div>
<!-- container end -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</body>
</html>