Vertical Flip Card Design using HTML & CSS

Vertical Flip Card Design using HTML & CSS

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.

<!DOCTYPE html> <html> <head> <title>Vertical Flip Card Design || Learningrobo</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="card"> <div class="card-front"> <h2>Project Exhibition</h2> </div> <div class="card-back"> <div class="container"> <h2>Zuciasi</h2> <p>Flair search</p> <span>Register</span> <div class="social-icons"> <i class="fab fa-facebook-f"></i> <i class="fab fa-twitter"></i> <i class="fab fa-google-plus-g"></i> <i class="fab fa-linkedin-in"></i> <i class="fab fa-instagram"></i> </div> </div> </div> <div class="credit">Made with <span style="color:tomato;font-size:20px;">❤</span> by <a href="https://www.learningrobo.com/">Learning Robo</a></div> </div> </body> </html>
CSS provides style to an HTML page. To make the page attractive, create a CSS file with the name style.css, and remember that you have to make a file with a .css 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;
}

We hope you will like this Vertical Flip Card Design using HTML & CSS.

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

Post a Comment

Thank you
Learning robo team

Post a Comment (0)

Previous Post Next Post
Learning Robo says...
code copied
Welcome