Create Flipping Effect on hover image | Sanwebcorner

Create Flipping Effect on hover image

Css3 haves a lot of animation things, So we can create lot of animation concepts using the css3. Now we will see about how to create a simple flippling effect using pure css code. There are two types of flipping effect one is called as a horizontal flipping effect and vertical flipping effect. This types of flipping effect done by using css3 transform:rotate properties. 
There are two types of content area is called as a front and back content areas will useful to place the contents and images. This type of animation effects is very useful for people pages , about pages and other pages in our websites. This css3 animation will done by using rotation properties first i given the rotation 180 degree the on hover i given the value for rotation is -180 degree so this is totally reverse of the content panel. Here the backface-visibility: hidden; used for both front and back content so the other side is not at all visible. Here is the live demo and the full code. You can customize this according to your choice. I hope this post is very useful.




Code for Flipping Effect on hover the image:

<html>
<head>
<title>How to Create Blink Text using css</title>
<style>
body{
padding:100px;
}
.flip-container {
perspective: 1000px;
}
.flip-container:hover .flipper, .flip-container.hover .flipper {
transform: rotateY(180deg);
}

.flip-container, .front, .back {
width: 320px;
height: 480px;
}

.flipper {
transition: 0.6s;
transform-style: preserve-3d;
position: relative;
}


.front, .back {
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
}

.front {
z-index: 2;
transform: rotateY(0deg);
}

.back {
transform: rotateY(180deg);
padding:10px;
}

.vertical.flip-container {
position: relative;
}

.vertical .back {
transform: rotateX(180deg);
}

.vertical.flip-container .flipper {
transform-origin: 100% 243.5px;
}

.vertical.flip-container:hover .flipper {
transform: rotateX(-180deg);
}
</style>
</head>
<body>
<div style="float:left; margin-right:30px;">
<h2>Horizontal Flip Effect</h2>
<div class="flip-container" ontouchstart="this.classList.toggle('hover');">
<div class="flipper">
<div class="front" style="background: url(1.jpg) 0 0 no-repeat;">
</div>
<div class="back" style="background:#f8f8f8;">
<div class="back-logo"></div>
<div class="back-title">Name</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent at lacus vehicula risus porta viverra quis vitae diam. Phasellus fermentum tortor magna, quis gravida libero facilisis in. Vestibulum imperdiet quam id consequat aliquet. Morbi ullamcorper consectetur orci sed rhoncus. Nunc in nunc semper ante porta dapibus sed commodo leo. Suspendisse rhoncus eros vel sapien rutrum sollicitudin. </p>
</div>
</div>
</div>
</div>

<div style="float:left; margin-right:10px;">
<h2>Vertical Flip Effect</h2>
<div class="flip-container vertical" ontouchstart="this.classList.toggle('hover');">
<div class="flipper">
<div class="front" style="background: url(1.jpg) 0 0 no-repeat;">
</div>
<div class="back" style="background:#f8f8f8;">
<div class="back-logo"></div>
<div class="back-title">Name</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent at lacus vehicula risus porta viverra quis vitae diam. Phasellus fermentum tortor magna, quis gravida libero facilisis in. Vestibulum imperdiet quam id consequat aliquet. Morbi ullamcorper consectetur orci sed rhoncus. Nunc in nunc semper ante porta dapibus sed commodo leo. Suspendisse rhoncus eros vel sapien rutrum sollicitudin. </p>
</div>
</div>
</div>
</div>
<br /><br />
</body>
</html>