In this tutorial we will show you how to rotate and flip images using CSS3.You may also like Image Zoom In On Hover Using CSS3
CHECK OUT THIS TUTORIAL LIVE DEMO →
To Rotate And Flip Images It Takes Only One Step:-
- Make a HTML file and define markup and styling Images
Step 1. Make a HTML file and define markup and styling Images
We make a HTML file and save it with a name images.html
<html> <head> <style> body { width:100%; margin:0 auto; padding:0px; background-color:#CEE3F6; font-family:helvetica; } #wrapper { text-align:center; margin:0 auto; padding:0px; width:100%; } h1 { margin-top:50px; color:#2E9AFE; } h1 p { font-size:14px; color:white; } img { width:250px; margin:20px; -moz-transition: all 0.3s; -o-transition: all 0.3s; -webkit-transition: all 0.3s; transition: all 0.3s; } #img1:hover { -moz-transform: rotate(180deg); -o-transform: rotate(180deg); -webkit-transform: rotate(180deg); transform: rotate(180deg); } #img2:hover { -moz-transform: scaleX(-1); -o-transform: scaleX(-1); -webkit-transform: scaleX(-1); transform: scaleX(-1); } </style> </head> <body> <div id="wrapper"> <img src="images/image1.jpg" id="img1"> <img src="images/image2.jpg" id="img2"> </div> </body> </html>
In this step we create two images one is for rotating effect and another is for flip effect.In our CSS
we use CSS3 transform property to rotate and flip image.
transform:rotate() is used to rotate the image and transform:scaleX is used to flip the image. You may also like Animated Login and SignUp Form With Flip Animation using CSS3 and jQuery
Thats all, this is how to Rotate And Flip Images Using CSS3. You can customize this code further as per your requirement. And please feel free to give comments on this tutorial.
Latest Tutorials
- Create Animated Skill Bar Using jQuery, HTML And CSS
- Simple And Best Responsive Web Design Using CSS Part 2
- Show Button On Hover Using HTML And CSS
- Material Design Login Form Using jQuery And CSS
- Animated Progress Bar Using jQuery And CSS
- Dynamic Drop Down Menu Using jQuery, Ajax, PHP And MySQL
- Get Website Statistics Using PHP, jQuery And MySQL
- HTML5 Login And Signup Form With Animation Using jQuery
- Facebook Style Homepage Design Using HTML And CSS
- View Webpage In Fullscreen Using jQuery