Hello developers, today in this blog you will learn to create a Parallax Card Design using HTML and CSS.
A card design is a UI design pattern that groups related information in a flexible-size container visually resembling a playing card. A card contains information about something or someone. A card may consist of images and text.
The parallax card design is a computer graphics technique used to create a faux-3D effect. The parallax effect is a difference in the apparent position of an object when viewed along two different lines of sight.
In this blog (Parallax Card Design), on the webpage, the card contains a profile icon, name, and some description of the person. When you hover on the card, the card gets flipped with the 3D effect of flipping a card with its content made by Parallax. After flipping a card that is when you hover on a card, a card contains a title as Contact Me. There is also some subtitle like your name, email, and message with its input field for each subtitle. Where you can fill in your details. There is a done button. When you click on the done button, the front card will have appeared immediately.
The source code of this Parallax Card Design using HTML & CSS is given below, if you want the source code of this program, you can copy it. You can use this Parallax Card Design using HTML & CSS on your projects.
Parallax Card Design [Source Code]
To make this website (Parallax Card Design), you need to create two files: an HTML file & a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
perspective: 1000px;
transform-style: preserve-3d;
position: relative;
background-color: #111;
font-family: "Montserrat";
}
.container {
min-width: 700px;
min-height: 350px;
border-radius: 20px;
position: relative;
-webkit-transition: 1.5s ease-in-out;
transition: 1.5s ease-in-out;
transform-style: preserve-3d;
}
.side {
position: absolute;
text-align: center;
width: 100%;
height: 100%;
padding: 20px 50px;
color: #fff;
transform-style: preserve-3d;
backface-visibility: hidden;
border-radius: 20px;
}
.content {
transform: translatez(70px) scale(0.8);
line-height: 1.5em;
}
.front .content{
float: right;
width: 350px;
margin-top: 25px;
}
.front .content h1 {
position: relative;
}
.front .content p {
margin-top: 50px;
line-height: 2em;
}
.content h1:before {
content: "";
position: absolute;
bottom: -20px;
height: 3px;
width: 70px;
left: 50%;
transform: translateX(-50%);
}
img{
width: 250px;
height: 250px;
float: left;
border-radius: 50px;
margin-top: 25px;
}
.front {
z-index: 2;
background: -webkit-linear-gradient(rgba(0,0,0, 0.9),rgba(0,0,0,0.9)), url("https://cdn.pixabay.com/photo/2015/07/17/22/43/student-849825__480.jpg");
background: linear-gradient(rgba(0,0,0, 0.9), rgba(0,0,0,0.9)),url("https://cdn.pixabay.com/photo/2015/07/17/22/43/student-849825__480.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.back {
background: -webkit-linear-gradient(rgba(0,0,0, 0.9),rgba(0,0,0,0.9)), url("https://cdn.pixabay.com/photo/2015/07/17/22/43/student-849825__480.jpg");
background: linear-gradient(rgba(0,0,0, 0.9), rgba(0,0,0,0.9)),url("https://cdn.pixabay.com/photo/2015/07/17/22/43/student-849825__480.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
transform: rotateY(180deg);
z-index: 0;
padding-top: 10px;
}
.container:hover {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
}
form {
text-align: left;
}
.back h1 {
margin: 0;
}
form label,
form input {
display: block;
}
form input,
form textarea {
background: transparent;
border: 0;
border-bottom: 2px solid #444;
padding: 5px;
width: 100%;
color: #fff;
}
form label {
margin: 15px 0;
}
form input[type="submit"] {
display: block;
width: auto;
margin: 10px auto;
padding: 5px 10px;
border: 3px solid #555;
border-radius: 4px;
color: #fff;
cursor: pointer;
}
.credit a{
text-decoration: none;
font-weight: 800;
color: tomato;
}
.credit {
text-align: center;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #fff;
margin-top: 50px;
}
Thank you for reading our blog. If you face any problem in creating this Parallax Card Design using HTML & CSS, then contact us or comment us. We’ll try to provide a solution to your problem as soon as possible.
Post a Comment
Thank you
Learning robo team