
Ahh ... Have nothing to write in the intro. Let's start with the code.
Basically what we are creating is a flip card like widget , which on hover flips .
View Demo
First the HTML -
Hello there.
Web . Code . Apple
We talk
Then the CSS -
body {
background: #555;
color: #555;
font-family: 'helvetica neue', arial, sans-serif;
}
#container {
background: -webkit-linear-gradient(top, #fff, #eee);
font-weight: bold;
margin: 100px;
padding: 20px 0 55px;
position: relative;
text-align: center;
width: 300px;
-webkit-border-radius: 5px;
-webkit-box-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
#hover-flip {
border-top: 1px solid #DDD;
bottom: 0;
color: #df3e7b;
font-size: 14px;
line-height: 40px;
position: absolute;
width: 100%;
box-shadow: inset 0 40px 5px rgba(0,0,0,0.2);
-webkit-transition: all .2s ease-in-out;
-webkit-perspective: 350;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
#hover-flip:hover {
background: #ddd;
box-shadow: inset 0 20px 5px rgba(0,0,0,0.2);
-webkit-transition: all .2s ease-in-out;
}
#hover-flip p {
background: #fff;
color: #009EE0;
margin-top: -40px;
position: relative;
-webkit-font-smoothing: antialiased;
-webkit-transform-origin: top;
-webkit-transition: all .2s ease-in-out;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
#hover-flip:hover p {
background: #bbb;
color: transparent;
-webkit-transform: rotateX(108deg);
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
//Code for Flip boxHello there.
Web . Code . Apple
We talk
Got any questions? Just comment .





No comments:
Post a Comment