
How to create a CSS Flip-card
Before We Start
Every developer needs clean and modern elements to develop their websites, It contains pictures and a user interface element within a website. The most important one and the first section that the user sees when the user enters a website. How to create a CSS Flip-card
So if you are a person who wishes to develop a website, you have to know how to create that properly.

How to create a CSS Flip-card
We are here to solve your problem. In this article we discuss how to create these 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.
<section class="header">
<h2>CSS Flip-Card </h2>
</section>
<section id="card" class="card">
<aside class="prof">
<b>1</b>
</aside>
<aside class="prof">
<b>2</b>
</aside>
<a href="https://twitter.com/twitalok" target="_blank" id="prof_link" class="sidebar">
<hgroup>
<strong class="price">550</strong>
<label>Price</label>
</hgroup>
<hgroup>
<strong class="discount">20%</strong>
<label>Discount</label>
</hgroup>
<hgroup>
<strong class="add-to-cart">
<div class="add-cart-icon">
</div>
</strong>
<label>Add to Cart</label>
</hgroup>
</a>
</section>
Step 2 – Add CSS
Copy and paste below code in your HTML editor between <style></style> tag.
<style>
* { box-sizing:border-box;}
body {
font-family:"Helvetica Neue",Arial,sans-serif;
background-color: #85FFBD;
background-image: linear-gradient(45deg, #85FFBD 0%, #FFFB7D 100%);
overflow-x: hidden;
}
section { text-align:center; padding:1px;}
.header {
padding-top: 100px;
background:rgba(255,255,255,.2);
color:rgba(0,0,0,.8);
text-shadow:1px 1px #dcdcdc;
}
.footer{
position:absolute; bottom:0;
padding:10px; clear:both;
width:100%;
}
.left{float:left;}
.mid{float:left;padding-left:30px;}
.right{float:right; padding-right:30px;}
h2 { font-size:1.1em; padding-bottom:1px; }
b { font-size:1.3em; }
.card {
display:-webkit-flex;
display:flex;
padding:30px;
position:relative;
width:240px;
margin:0 auto;
transition:opacity .25s, -webkit-filter .25s, filter .25s;
}
.loading { opacity:.5; -webkit-filter:grayscale(1); }
.prof {
float:left;
position:relative;
z-index:1;
width:100px;
height:180px;
background:#66cccc;
background-size:200% 100%;
transform-origin:left center;
border-radius:1em 0 0 1em;
}
.prof b{
color: white;
text-align: center;
font-size: 170px;
font-weight:bold;
}
.prof:nth-child(2){
background-position:100px 0;
box-shadow:inset 100px 0 rgba(0,0,0,0);
transition:box-shadow .4s, transform .4s;
transform:perspective(500px);
border-radius:0 1em 1em 0;
}
section:hover .prof:nth-child(2){ transform:
perspective(500px) rotateY(-45deg) ;
box-shadow:inset 100px 0 rgba(0,0,0,.2); }
.sidebar {
position:absolute;
display:block;
text-decoration:none;
-webkit-align-self:center;
align-self:center;
z-index:0;
width:200px;
text-align:right;
transform-origin:left center;
}
hgroup {
position:relative;
display:block;
left:0px;
border:1px solid rgba(0,0,0,.4);
padding:8px 12px;
color:#888;
line-height:16px;
background:#f9f9f9;
transition:.5s;
cursor:pointer;
border-radius:5px;
margin:5px 0;
user-select:none;
opacity:.5;
clear:both;
}
.add-to-cart{
display:block;
height: 20px;
width: auto;
}
.add-cart-icon{
float: right;
display: block;
position:relative;
z-index:1;
width:25px;
height:20px;
background:url(http://alok007.files.wordpress.com/2013/01/add-to-cart-icon.png) #f9f9f9;
transform-origin:right center;
border-radius:1em 0 0 1em;
}
section:hover .sidebar hgroup { left:120px; opacity:1; }
hgroup:nth-child(2){ transition-delay:.1s; }
hgroup:nth-child(3){ transition-delay:.2s; }
strong { display:block; color:#000; font-weight:700; font-size:14px; line-height:16px; }
label { font-size:10px; text-transform:uppercase; }
hgroup:hover, hgroup:hover strong, a:hover { color:#0084B4; }
</style>
At the end we will have something like this. You can change fonts, colors, backgrounds and all things that you want. Enjoy it.
Your Output

Your Output

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.