Skip to content

Instantly share code, notes, and snippets.

@rzakfirst
Created December 30, 2022 23:01
Show Gist options
  • Save rzakfirst/8f57ba609b394bb331b930d56295b268 to your computer and use it in GitHub Desktop.
Save rzakfirst/8f57ba609b394bb331b930d56295b268 to your computer and use it in GitHub Desktop.
Profile Card UI Design Cool Hover Effect
<div class="container">
<div class="row">
<div class="col-12 col-sm-6 col-md-4 col-lg-3">
<div class="our-team">
<div class="picture">
<img class="img-fluid" src="https://picsum.photos/130/130?image=1027">
</div>
<div class="team-content">
<h3 class="name">Michele Miller</h3>
<h4 class="title">Web Developer</h4>
</div>
<ul class="social">
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-facebook" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-twitter" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-google-plus" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-linkedin" aria-hidden="true"></a></li>
</ul>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4 col-lg-3">
<div class="our-team">
<div class="picture">
<img class="img-fluid" src="https://picsum.photos/130/130?image=839">
</div>
<div class="team-content">
<h3 class="name">Patricia Knott</h3>
<h4 class="title">Web Developer</h4>
</div>
<ul class="social">
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-facebook" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-twitter" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-google-plus" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-linkedin" aria-hidden="true"></a></li>
</ul>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4 col-lg-3">
<div class="our-team">
<div class="picture">
<img class="img-fluid" src="https://picsum.photos/130/130?image=856">
</div>
<div class="team-content">
<h3 class="name">Justin Ramos</h3>
<h4 class="title">Web Developer</h4>
</div>
<ul class="social">
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-facebook" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-twitter" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-google-plus" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-linkedin" aria-hidden="true"></a></li>
</ul>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4 col-lg-3">
<div class="our-team">
<div class="picture">
<img class="img-fluid" src="https://picsum.photos/130/130?image=836">
</div>
<div class="team-content">
<h3 class="name">Mary Huntley</h3>
<h4 class="title">Web Developer</h4>
</div>
<ul class="social">
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-facebook" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-twitter" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-google-plus" aria-hidden="true"></a></li>
<li><a href="https://codepen.io/collection/XdWJOQ/" class="fa fa-linkedin" aria-hidden="true"></a></li>
</ul>
</div>
</div>
</div>
</div>
body {
font-family: tahoma;
height: 100vh;
background-image: url(https://picsum.photos/g/3000/2000);
background-size: cover;
background-position: center;
display: flex;
align-items: center;
}
.our-team {
padding: 30px 0 40px;
margin-bottom: 30px;
background-color: #f7f5ec;
text-align: center;
overflow: hidden;
position: relative;
}
.our-team .picture {
display: inline-block;
height: 130px;
width: 130px;
margin-bottom: 50px;
z-index: 1;
position: relative;
}
.our-team .picture::before {
content: "";
width: 100%;
height: 0;
border-radius: 50%;
background-color: #1369ce;
position: absolute;
bottom: 135%;
right: 0;
left: 0;
opacity: 0.9;
transform: scale(3);
transition: all 0.3s linear 0s;
}
.our-team:hover .picture::before {
height: 100%;
}
.our-team .picture::after {
content: "";
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #1369ce;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.our-team .picture img {
width: 100%;
height: auto;
border-radius: 50%;
transform: scale(1);
transition: all 0.9s ease 0s;
}
.our-team:hover .picture img {
box-shadow: 0 0 0 14px #f7f5ec;
transform: scale(0.7);
}
.our-team .title {
display: block;
font-size: 15px;
color: #4e5052;
text-transform: capitalize;
}
.our-team .social {
width: 100%;
padding: 0;
margin: 0;
background-color: #1369ce;
position: absolute;
bottom: -100px;
left: 0;
transition: all 0.5s ease 0s;
}
.our-team:hover .social {
bottom: 0;
}
.our-team .social li {
display: inline-block;
}
.our-team .social li a {
display: block;
padding: 10px;
font-size: 17px;
color: white;
transition: all 0.3s ease 0s;
text-decoration: none;
}
.our-team .social li a:hover {
color: #1369ce;
background-color: #f7f5ec;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.2/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
@rzakfirst
Copy link
Author

Test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment