Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
4F24L committed Feb 21, 2024
0 parents commit 67f2b1f
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 0 deletions.
25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flip Card</title>

<link rel="stylesheet" href="style.css">
</head>
<body>

<div class="wrapper">
<div class="flip">
<div class="card front">
<img src="irfan.jpg" alt="">
</div>
<div class="card back">
<img src="irfan.jpg" alt="">
<div class="name">Irfan Mir</div>
<div class="txt">Flip Card</div>
</div>
</div>
</div>
</body>
</html>
Binary file added irfan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
*{
padding: 0;
margin: 0;
box-sizing: border-box;
/* transform-style: preserve-3d; */
perspective: 1000px;
}

.wrapper{
height: 100vh;
overflow-x: hidden;
overflow-y: auto;

display: flex;
justify-content: center;
align-items: center;

transform-style: preserve-3d;
}

.flip{
height: 400px;
width: 350px;
transform-style: preserve-3d;
}
.card{
position: absolute;

/* border: 2px solid black; */
box-shadow: 0 0 10px rgb(150, 150, 150);
border-radius: 15px;

height: 400px;
width: 350px;
transform-style: preserve-3d;
transform: rotateY(0deg);
}

.front{
/* position: absolute; */

}

.front img{
height: 100%;
width: 100%;
object-fit: cover;
border-radius: 15px;

box-shadow: 0 0 10px rgb(150, 150, 150);
}

.back{
visibility: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;

background-color: #9fffe4;
transform: rotateY(180deg);
}

.back img{
height: 150px;
width: 150px;
padding:4px;
background-color: #fff;
box-shadow: 0 0 5px rgb(70, 70, 70);
border-radius: 50%;

margin-bottom: 40px;
}

.name{
font-size: 2rem;
text-transform: uppercase;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-weight: 600;
margin-bottom: 20px;
}

.txt{
padding:10px 15px;
text-align: center;
box-shadow: 0 0 5px rgb(159, 159, 159);

/* color: red; */
font-weight: bold;
text-transform: uppercase;
background-color: #fff6c6;
border-radius: 15px;
}

.flip:hover{
transform: rotateY(-180deg);
transition: 0.7s;

}

.flip:hover .back{
visibility: visible;
transition: 0.7s;
}

0 comments on commit 67f2b1f

Please sign in to comment.