
parallax flipping cards
Before We Start
Every developers need, clean and modern elements to develop their websites, It contain pictures and a user interface element within a website. The most important one and the first section that the user sees when he/she enters a website. parallax flipping cards
So if you are a person who wishes to develop a website, you have to know how to create that properly.
parallax flipping cards
We are here to solve your problem. In this article we discuss how to create this elements. Before we start please read the below articles which easier you to understand the process, if you are new to development.
Step 1 – Add HTML
It’s too easy and simple. Just copy and paste below code in your HTML editor between <body> </body> tag.
<html>
<body>
<div class="pseudo-parallax-card-container flex flex-row">
<div class="mock top left"></div>
<div class="mock top right"></div>
<div class="mock bottom left"></div>
<div class="mock bottom right"></div>
<div class="content-container flex">
<div class="controls-container flex flex-row">
<span class="control"></span>
<span class="control"></span>
<span class="control"></span>
</div>
<div class="message-container">
<div class="message message-one"></div>
<div class="message message-two"></div>
<div class="message message-three"></div>
<div class="instructions">
<h2 class="name">Parallax Card </h2>
</div>
</div>
</div>
</div>
</body>
</html>
Step 2 – Add CSS
Copy and paste below code in your HTML editor between <style></style> tag.
<style>
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@600&display=swap");
:root {
--angleX: 0deg;
--angleY: 0deg;
}
body {
height: 100vh;
display: -webkit-box;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-flow: column;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
background-color: #adc0ca;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: perspective(600px);
transform: perspective(600px);
font-family: "Open Sans", sans-serif;
}
.flex {
display: -webkit-box;
display: flex;
}
.flex.flex-row {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
flex-flow: row wrap;
}
.pseudo-parallax-card-container {
width: 300px;
height: 350px;
}
.mock {
width: 50%;
height: 50%;
z-index: 2;
}
.mock.left.top:hover ~ .content-container {
--angleX: 8deg;
--angleY: -25deg;
}
.mock.left.bottom:hover ~ .content-container {
--angleX: -8deg;
--angleY: -25deg;
}
.mock.right.top:hover ~ .content-container {
--angleX: 8deg;
--angleY: 25deg;
}
.mock.right.bottom:hover ~ .content-container {
--angleX: -8deg;
--angleY: 25deg;
}
.content-container {
position: absolute;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
width: 300px;
height: 350px;
text-align: center;
background-color: #2e4362;
border-radius: 10px;
color: black;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: box-shadow 0.5s ease, -webkit-transform 0.65s ease;
transition: box-shadow 0.5s ease, -webkit-transform 0.65s ease;
transition: box-shadow 0.5s ease, transform 0.65s ease;
transition: box-shadow 0.5s ease, transform 0.65s ease, -webkit-transform 0.65s ease;
will-change: transform;
box-shadow: -20px 10px 20px rgba(0, 0, 0, 0.4);
-webkit-transform: translateY(0) rotateX(var(--angleX, 0)) rotateY(var(--angleY, 0)) translateZ(-10px);
transform: translateY(0) rotateX(var(--angleX, 0)) rotateY(var(--angleY, 0)) translateZ(-10px);
-webkit-filter: brightness(110%);
filter: brightness(110%);
}
.controls-container {
position: absolute;
top: 5%;
left: 75%;
width: 50px;
height: 20px;
-webkit-box-pack: justify;
justify-content: space-between;
}
.controls-container .control {
width: 10px;
height: 10px;
border-radius: 100%;
background-color: #2e4362;
box-shadow: -2px 2px 1px black, -0.5px 1px 0px #f0f0f0 inset;
}
.message-container .message {
position: absolute;
top: 35%;
left: -20%;
width: 180px;
height: 40px;
z-index: 200;
border-radius: 20px;
box-shadow: -20px 10px 10px rgba(0, 0, 0, 0.2), -1px -1px 0px #a0a0a0 inset;
}
.message-container .message-one {
background: #528acf;
}
.message-container .message-two {
top: 55%;
left: 60%;
background: #ffb6cd;
}
.message-container .message-three {
left: 60%;
top: 75%;
background: #97fac9;
}
.message-container .instructions {
position: absolute;
top: 10%;
width: 100%;
left: 0%;
}
.name {
color: #adc0ca;
}
</style>
At the end we will have something like this. You can change fonts, colors, backgrounds and all things that you want. Enjoy it.

Video Tutorial
Please watch this video to better understand this tutorial and don’t forget to subscribe to our channel.
Help others to find out about this article on Social Media sites. If you have any doubt or any problem, don’t hesitate to contact us. Thereafter we will be able to help you and also make sure you bookmark our site on your browser.