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>

Post a Comment

Labels

360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll create random number Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient hide menu Horizontal News ticker Hover Htm Html html dropdown html form html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript Jquery js Layered image effect on mouse hover lock & unlock page scroll marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form Multi-Step-form mysql News ticker on hover change text to image our team page password generator password strength checker Photoshop PHP populate html selectbox Popup image on click the link pure css Question type form random number generate Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image selectbox based on select box simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips Youtube