Hello developers, today in this blog, you'll learn to create a Vertical Flip Card Design using HTML & CSS.
A card is a small rectangular box with images and text. The user can learn many details. To maintain the usability of the website interface, the card UI pattern is a default choice. Because cards are easy to use, they can also show content that contains different details.
In this blog (Vertical Flip Card Design) on the webpage, there is a card at the center of the page. The card contains two sides, the front, and the back part. The front side of the card contains the image, and the back card contains some text with a button and some social media icons. At first, the front card contain an image that would be made visible. When you hover on that image, this card flip or rotates vertically and show you the back part of the card.
The source code of this Vertical Flip Card Design is given below, if you want the source code of this program, you can copy it. You can use this Vertical Flip Card Design with your creativity and can take this project to the next level.
Vertical Flip Card Design [Source Code]
To make this website, you would like to make 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.
body{
margin: 0;
padding: 0;
font-family: 'Source Sans Pro', sans-serif;
}
.card{
position: absolute;
top: 50%;
left: 50%;
height: 400px;
width: 300px;
transform: translate(-50%, -50%);
transform-style: preserve-3d;
perspective: 600px;
transition: .5s;
}
.card:hover .card-front{
transform: rotateX(-180deg)
}
.card:hover .card-back{
transform: rotateX(0deg)
}
.card-front{
height: 100%;
width: 100%;
background-image: url(https://cdn.pixabay.com/photo/2017/08/29/06/17/lightbulb-2692247__340.jpg);
background-position: 10%;
background-size: cover;
top: 0;
left: 0;
background-color: #000000;
backface-visibility: hidden;
transform: rotateX(0deg);
transition: .5s;
}
.card-back{
height: 100%;
width: 100%;
position: absolute;
background: linear-gradient(to right, #F37335, #FDC830);
top: 0;
left: 0;
backface-visibility: hidden;
transform: rotateX(180deg);
transition: .5s;
color: #000;
text-align: center;
}
.card-back .container{
margin: 30% auto 35% auto;
font-size: 26px;
}
.card-back span{
font-size: 20px;
display: inline;
color: #fff;
background: #000;
border-radius: 30px;
padding: 7px 15px;
border: 2px solid #000;
}
.card-back span:hover{
border: none;
}
.card-back i{
height: 20px;
width: 20px;
padding: 10px 10px;
border-radius: 50%;
line-height: 20px;
margin-top: 30px;
}
.card-back i:hover{
color: #000;
background-color: #fff;
}
.card-front h2{
z-index: 10;
color: #000;
font-size: 25px;
text-align: center;
padding-top: 10px;
letter-spacing: 4px;
}
.credit a{
text-decoration: none;
color: #000;
font-weight: 800;
}
.credit {
font-family: Verdana, Geneva, Tahoma, sans-serif;
margin: 10px;
color:#000;
text-align: center;
}
Thank you for reading our blog. If you face any problem creating this Vertical Flip 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.
إرسال تعليق
Thank you
Learning robo team