CSS Responsive Card Hover Effects | Html & CSS
Source Code:-
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css">
<!-- Latest compiled and minified CSS -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
i {
opacity: 0;
font-size: 18px;
color: #fff;
will-change: transform;
-webkit-transform: scale(0.1);
transform: scale(0.1);
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
h2 {
pointer-events: none;
}
body {
background-color: #E6E5E1;
width: 100vw;
height: 100vh;
}
.container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.container .card {
position: relative;
width: 500px;
height: 200px;
background-color: #fff;
overflow: hidden;
margin-bottom: 4px;
}
.container .card:before {
content: "";
z-index: 99;
position: absolute;
top: -10px;
left: 32px;
display: block;
width: 16px;
height: 16px;
border-radius: 16px;
background-color: #E6E5E1;
}
.container .card:after {
content: "";
z-index: 99;
position: absolute;
bottom: -10px;
left: 32px;
display: block;
width: 16px;
height: 16px;
border-radius: 16px;
background-color: #E6E5E1;
}
.container .card ul {
z-index: 99;
position: absolute;
left: 39px;
top: 5px;
list-style-type: none;
}
.container .card ul li {
width: 2px;
height: 2px;
border-radius: 2px;
margin: 6px 0;
background-color: #E6E5E1;
}
.container .card h2 {
z-index: 99;
font-family: "Poppins", sans-serif;
position: absolute;
bottom: 0;
right: 130px;
font-size: 30px;
font-weight: 700;
color: #fff;
}
.container .card .fa-arrow-right {
z-index: 100;
position: absolute;
right: 75px;
bottom: 25px;
font-size: 40px;
cursor: pointer;
}
.container .card p {
z-index: 99;
position: absolute;
top: 20px;
right: 70px;
color: #333;
opacity: 0.7;
font-size: 12px;
letter-spacing: 1px;
writing-mode: vertical-lr;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.container .card .pic {
z-index: 100;
width: 400px;
height: 200px;
background-image: url("../ranveerr.jpg");
background-size: 100% 100%;
filter: grayscale(100%);
}
.container .card .social {
position: absolute;
left: 60px;
top: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: distribute;
justify-content: space-around;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
width: 180px;
height: 64px;
border-radius: 80px;
}
.social .facebook {
color: #3b5998;
}
.social .instagram {
background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.social .twitter {
color: #00acee;
}
.social .youtube {
color: #c4302b;
}
.container .card .social i:nth-of-type(1) {
-webkit-transition-delay: 0.4s;
transition-delay: 0.4s;
}
.container .card .social i:nth-of-type(2) {
-webkit-transition-delay: 0.3s;
transition-delay: 0.3s;
}
.container .card .social i:nth-of-type(3) {
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
}
.container .card .social i:nth-of-type(4) {
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s;
}
.container .card:hover i {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
.container .card button {
position: absolute;
right: 14px;
bottom: 14px;
width: 30px;
height: 30px;
background-color: #daf156;
border: none;
border-radius: 30px;
cursor: pointer;
outline: none;
transition: all 0.3s ease;
mix-blend-mode: hard-light;
}
.container .card button i {
font-size: 3rem;
}
.container .card:hover button {
transform: scale(16.5);
}
.container .card:hover p {
color: #ff0000;
}
.container .card:hover .pic {
filter: grayscale(0);
}
.container .card2 .pic {
background-image: url(../deepika.jpg);
}
.container .card2 button {
background-color: #56c3f1;
}
.dr {
position: absolute;
bottom: 16px;
right: 16px;
width: 100px;
}
</style>
</head>
<body>
<div class="container">
<div class="card">
<h2>Ranveer Singh</h2>
<i class="fas fa-arrow-right"></i>
<p>Bollywood Actor</p>
<div class="pic"></div>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div class="social">
<i class="fab fa-facebook-f facebook"></i>
<i class="fab fa-twitter twitter"></i>
<i class="fab fa-instagram instagram"></i>
<i class="fab fa-youtube youtube"></i>
</div>
<button>
</button>
</div>
<div class="card card2">
<h2>Deepika Padukone</h2>
<i class="fas fa-arrow-right"></i>
<p>Bollywood Actress</p>
<div class="pic"></div>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div class="social">
<i class="fab fa-facebook-f facebook"></i>
<i class="fab fa-twitter twitter"></i>
<i class="fab fa-instagram instagram"></i>
<i class="fab fa-youtube youtube"></i>
</div>
<button>
</button>
</div>
</div>
</body></html>
Post a Comment